Kaleb KEITHLEY has uploaded this change for review.
main: periodically poke malloc()/free() to release memory
Try to improve the odds that freed memory will be released
to the operating system, potentially reducing VIRT and RES
sizes.
malloc_trim(3) is in glibc, and when compiling with tcmalloc
or jemalloc it effectively becomes a no-op.
For allocations above a certain size (128K default) malloc(3)
uses mmap, which should usually be released when freed. But
below that memory is allocated by the use of brk(2) to increase
the size of the program in memory. Freeing memory allocated with
brk(2) may or may not happen automatically. Calling malloc_trim(2)
may release memory when it isn't released after freeing it.
Change-Id: I543e320128db8f6382c462a1b52518a89a0bcfcb
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
---
M src/MainNFSD/nfs_init.c
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/54/1170254/1
To view, visit change 1170254. To unsubscribe, or for help writing mail filters, visit settings.