Use malloc_trim to return memory to OS

54 views
Skip to first unread message

Xuesen

unread,
Oct 20, 2023, 3:19:33 AM10/20/23
to memcached
Hello,


One page is freed by slabs.c:memory_release when cache_memlimit command adjust memory limitation. But sometimes glibc do not return the freed memory to operating system, which make users confusing with memcached's memory Resident Size. The following example shows that about 25GB memory is not return to OS.

image

malloc_trim can release memory back to the system.


Reply all
Reply to author
Forward
0 new messages