[Gllug] mallinfo

Nix nix at esperi.org.uk
Fri Nov 2 12:32:51 UTC 2007


On 30 Oct 2007, Kostas Georgiou uttered the following:
> Right, like python for example where the pymalloc memory allocator (only
> used for objects less than 256 bytes thankfully) never bothered to free
> any memory at all until recently (http://evanjones.ca/python-memory.html
> for the details).

Actually, it did. It released freed objects back into the pymalloc pool,
but never shrunk the pymalloc pool. This sort of decision appears
reasonable if you think that most programs allocate and free memory at
random: but they don't; they often free huge lumps of memory (or lots of
tiny objects in the case of pymalloc) that they only just allocated, and
*that* case should result in freeing of the empty part of the pymalloc
pool back to the OS or overlying allocator. Until Python 2.5, it didn't.

-- 
`Some people don't think performance issues are "real bugs", and I think 
such people shouldn't be allowed to program.' --- Linus Torvalds
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list