[PATCH v2] Allow shrinking of arena heaps using mmap based on overcommit settings when available

Siddhesh Poyarekar siddhesh@redhat.com
Fri Aug 24 15:27:00 GMT 2012


Hi,

Here's an updated patch with changes according to Roland's review
comments.  This works fine on my x86_64 Fedora 16 laptop and does not
cause regressions in the testsuite.

Regards,
Siddhesh

ChangeLog:

	* malloc/arena.c: Include malloc-sysdep.h.
	(shrink_heap): Use check_may_shrink_heap to decide if madvise
	is sufficient to shrink the heap or an unmap is needed.
	* sysdeps/generic/malloc-sysdep.h: New file.  Define
	new function check_may_shrink_heap.
	* sysdeps/unix/sysv/linux/malloc-sysdep.h: New file.  Define
	new function check_may_shrink_heap.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-shrink-heap.patch
Type: text/x-patch
Size: 4761 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120824/c45cd9cd/attachment.bin>


More information about the Libc-alpha mailing list