On Thu, 9 Dec 2010 17:18:58 +0000 Rob Randall <rob.randa...@gmail.com> wrote: > Basically the process runs at around 1% and it never seems to grow in size > again. > When running the C++ with python app the process slows when a new 'page' is > required but then goes back to 'full' speed. It does this until basically > all the virtual memory is used.
Intuitively, Benjamin Kaplan had the right answer: Python will periodically walk the heap of objects to look for dead reference cycles to collect; if your working set is larger than the available RAM, then this will thrash the pagefile to death. So try gc.disable() before doing your tests. I would stress that, of course, you will still have performance problems as soon as you start using all those areas you are allocating. And if you don't use them, I guess there's no point allocating them either. So I don't know what exactly you're trying to do (is this an actual application? or just some random test you're doing?), but relying on the pagefile to have more available memory than the system RAM is a very bad idea IMO. Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list