[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Frantic (again)



On 26 Jun 2006 at 13:00, Brian Fisher wrote:

> ... also one thing to note when trying to track down mem usage of a
> game, I remember that python never freed stuff in favor of keeping
> allocated memory in a pool (at least that is true with 2.3) so that
> the (virtual) memory allocation from the OS' perspective would always
> be the largest that it ever was at any given moment - so if an app's
> mem usage ballooned to 1GB, then from then on only used like 128MB, it
> would say 1GB forever. So if you see a high mem usage which is not
> growing, it may have been a function that allocated a bunch to do some
> temporary one-time thing...
> 
Python keeps a small object pool. For objects larger than 256 bytes 
(Python 2.3) malloc/free are used directly. And as best as I can tell 
this only applies to memory directly assigned to an object, and not 
any extra memory an object, such as a list, might request.



Lenard Lindstrom
<len-l@xxxxxxxxx>