On Jul 30, 2005, at 4:27 AM, Chris Fonnesbeck wrote: > I have a Bayesian simulation package, PyMC, that I run on OSX 10.4 > using either Python 2.3.5 or the ActiveState 2.4. It essentially > generates long sample arrays of parameter values, which it then > summarizes at the end (I am using Numeric arrays). However, after a > simulation of only 80K iterations (for about 7 parameters), I start > running into memory allocation problems: > > python(22156,0xa000ef98) malloc: *** vm_allocate(size=1400324096) > failed (error code=3) > python(22156,0xa000ef98) malloc: *** error: can't allocate region > python(22156,0xa000ef98) malloc: *** set a breakpoint in > szone_error to debug
I imagine that the issue here is related to the following: http://bob.pythonmac.org/archives/2005/01/01/realloc-doesnt/ I suggest taking a look for code that creates big objects, resizes them to be smaller, and keeps them around for a bit. The networking code in Python did this for strings in the networking code for a while (you could probably find it by searching for vm_allocate on python-dev archives). -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig