diff options
author | Petr Rockai <prockai@redhat.com> | 2011-05-07 13:50:11 +0000 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2011-05-07 13:50:11 +0000 |
commit | eee66d2a80df173126d0db4f345fbf601c50859b (patch) | |
tree | 827cae3564461fc304d30667b2d9adfe29b00f65 /liblvm/lvm_base.c | |
parent | 833a287337262306ec525e7861ddc067ea4d82a1 (diff) | |
download | lvm2-eee66d2a80df173126d0db4f345fbf601c50859b.tar.gz lvm2-eee66d2a80df173126d0db4f345fbf601c50859b.tar.xz lvm2-eee66d2a80df173126d0db4f345fbf601c50859b.zip |
When glibc needs buffers for line buffering of input and output buffers, it
allocates these buffers in such way it adds memory page for each such buffer
and size of unlock memory check will mismatch by 1 or 2 pages.
This happens when we print or read lines without '\n' so these buffers are
used. To avoid this extra allocation, use setvbuf to set these bufffers ahead.
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Milan Broz <mbroz@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
Diffstat (limited to 'liblvm/lvm_base.c')
-rw-r--r-- | liblvm/lvm_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/liblvm/lvm_base.c b/liblvm/lvm_base.c index 9e1a8ecd..f44b786c 100644 --- a/liblvm/lvm_base.c +++ b/liblvm/lvm_base.c @@ -34,7 +34,7 @@ lvm_t lvm_init(const char *system_dir) /* create context */ /* FIXME: split create_toolcontext */ /* FIXME: make all globals configurable */ - cmd = create_toolcontext(0, system_dir); + cmd = create_toolcontext(0, system_dir, 1); if (!cmd) return NULL; |