[Xcb] [RFC] XCB without use of malloc()
Donnie Berkholz
dberkholz at gentoo.org
Mon Jan 7 15:53:54 PST 2008
On 14:23 Sun 06 Jan , Maxim Levitsky wrote:
> Probably you are right. I wish glibc developers would use mmap() more often
> instead of that large brk() that only keeps growing.
You can configure that. From my environment setup file:
# Use brk() rather than mmap(), which is basically a tradeoff in memory
# for better performance
# The maximum number of chunks to allocate with `mmap'.
# Setting this to zero disables all use of `mmap'.
MALLOC_MMAP_MAX_="0"
# All chunks larger than this value are allocated outside the
# normal heap, using the `mmap' system call. This way it is
# guaranteed that the memory for these chunks can be returned
# to the system on `free'. Note that requests smaller than
# this threshold might still be allocated via `mmap'.
MALLOC_TRIM_THRESHOLD="-1"
Thanks,
Donnie
More information about the Xcb
mailing list