Remove code that relies on sbrk()

Taylor R Campbell campbell+unbound at
Fri Nov 18 15:02:51 UTC 2016

   Date: Fri, 18 Nov 2016 12:39:01 +0100
   From: Dag-Erling Smørgrav via Unbound-users <unbound-users at>

                         First, modern allocators (and by "modern" I mean
   "anything written in the last 10-15 years") use mmap(), not sbrk(), to
   manage address space.

Both jemalloc and glibc use sbrk in addition to mmap.

                          Second, even with allocators that do rely on
   sbrk(), it only tells you how much address space is available to the
   program, not how much of it is currently or has ever been used.

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.

More information about the Unbound-users mailing list