o allocating 256 bytes reduces the heap space by 272 bytes (16 bytes overhead)
o allocating 257 through 264 bytes reduces the heap space by 280 bytes (23 to 16 bytes overhead)
o allocating 265 through 272 bytes reduces the heap space by 288 bytes (23 to 16 bytes overhead)The conclusion that I draw from this data is that the allocation request is rounded up, if necessary, to be an integral multiple of 8 and then 16 bytes is added for tracking information.
I'm a bit surprised at this. I would have expected the request to be rounded up to an integral multiple of 4. Further, I expected to see at most 8 bytes of tracking overhead - 4 for the block size and 4 for a link to the next element in the list. I have written allocators that had overhead for only the block size (the "next element" link being stored in the data area of the freed block). Perhaps they're keeping all blocks, whether allocated or free, on a doubly linked list and storing the size, too.Statistics: Posted by dkinzer — Wed Sep 16, 2015 8:00 am
]]>