Remove code that relies on sbrk()
des at des.no
Fri Nov 18 18:24:27 UTC 2016
Taylor R Campbell <campbell+unbound at mumble.net> writes:
> Both jemalloc and glibc use sbrk in addition to mmap.
Jemalloc *can* use sbrk() in addition to mmap() if enabled at build
time, but even then, it will try mmap() first, unless you explicitly
configure it at runtime to prefer sbrk() over mmap(). And it's still
not a meaningful measure of the amount of memory in use.
> glibc and at least some versions of jemalloc use brk(p) or sbrk(-x) to
> release part of the data segment back to the operating system.
Which will only work if the heap is not very fragmented.
Dag-Erling Smørgrav - des at des.no
More information about the Unbound-users