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 /tools/lvmcmdline.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 'tools/lvmcmdline.c')
-rw-r--r-- | tools/lvmcmdline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 197cd143..3e13a27d 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -1282,7 +1282,7 @@ struct cmd_context *init_lvm(void) if (!udev_init_library_context()) stack; - if (!(cmd = create_toolcontext(0, NULL))) + if (!(cmd = create_toolcontext(0, NULL, 1))) return_NULL; _cmdline.arg_props = &_arg_props[0]; |