
24 Apr
2012
24 Apr
'12
7:14 a.m.
On Tue, 24 Apr 2012, "Trent W. Buck" <trentbuck@gmail.com> wrote:
My memory was that modern linux, at least, if an app said "can I have 1kB? now another? and a little bit more" the allocator would (under the hood - transparent to the app) initially allocate the minimum sane chunk up-front, and dole out from that as necessary.
I just wrote a small test program and a few calls to malloc() of up to 400 bytes will come from brk(). I didn't test when it switches to mmap(). -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/