"High water" Memory fragmentation still a thing?
mm0fmf
none at mailinator.com
Sun Oct 5 15:23:42 EDT 2014
On 04/10/2014 02:02, Steven D'Aprano wrote:
> Way back in the mid 1980s, Apple Macintoshes used a memory manager which
> could move memory around.
But the memory manager didn't return a pointer to memory the way malloc
does. It returned a pointer to the pointer and you had to double
dereference it to get the heap address (ISTR, 30 years ago now). The
advantage being the memory manager could shuffle the memory about and
update the pointers. Your pointer to a pointer would still point to the
same block after a shuffle. Of course you couldn't hold on to a partial
dereference across system calls... can you guess why? :-)
Linux has (had) a allocation scheme where blocks came from different
sized areas depending on the size requested. So all requests below 4k
came from one heap area, and so on for 16k, 64k 256k, 1M etc. Meaning
that code requesting a freeing up small amounts fragged the small
allocation zone and so a big allocation would die due to fragmentation
of small amounts. That was in kernel 2.4 days, sorry I'm off the
bleeding edge now with how the allocator works in modern kernels.
Andy
More information about the Python-list
mailing list