[issue11849] glibc allocator doesn't release all free()ed memory

Charles-François Natali report at bugs.python.org
Mon May 2 23:59:21 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> I guess the final patch will have to guard the mallopt() call with some #ifdef?

Yes. See attached patch pymalloc_frag.diff
It's the first time I'm playing with autotools, so please review this part really carefully ;-)

> (also, I suppose a portable solution would have to call mmap() ourselves
> for allocation of arenas, but that would probably be a bit more involved)

Yes. But since it probably only affects glibc/eglibc malloc versions, I guess that target implementations are likely to provide mallopt(M_MMAP_THRESHOLD).
Also, performing an anonymous mappings varies even among Unices (the mmapmodule code is scary). I'm not talking about Windows, which I don't know at all.

----------
Added file: http://bugs.python.org/file21864/pymalloc_frag.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11849>
_______________________________________


More information about the Python-bugs-list mailing list