[Python-Dev] Problems with the Python Memory Manager

"Martin v. Löwis" martin at v.loewis.de
Thu Nov 24 10:14:41 CET 2005

Travis Oliphant wrote:
> So, I now believe that his code (plus the array scalar extension type) 
> was actually exposing a real bug in the memory manager itself.  In 
> theory, the Python memory manager should have been able to re-use the 
> memory for the array-scalar instances because they are always the same 
> size.  In practice, the memory was apparently not being re-used but 
> instead new blocks were being allocated to handle the load.

That is really very hard to believe. Most people on this list would
probably agree that obmalloc certain *will* reuse deallocated memory
if the next request is for the very same size (number of bytes) that
the previously-release object had.

> His code is quite complicated and it is difficult to replicate the 
> problem.  

That the code is complex would not so much be a problem: we often
analyse complex code here. It is a problem that the code is not
available, and it would be a problem if the problem was not
reproducable even if you had the code (i.e. if the problem would
sometimes occur, but not the next day when you ran it again).

So if you can, please post the code somewhere, and add a bugreport
on sf.net/projects/python.


More information about the Python-Dev mailing list