Possible to set cpython heap size?

"Martin v. Löwis" martin at v.loewis.de
Thu Feb 22 15:00:09 EST 2007


Andy Watson schrieb:
> I have an application that scans and processes a bunch of text files.
> The content I'm pulling out and holding in memory is at least 200MB.
> 
> I'd love to be able to tell the CPython virtual machine that I need a
> heap of, say 300MB up front rather than have it grow as needed.   I've
> had a scan through the archives of comp.lang.python and the python
> docs but cannot find a way to do this.  Is this possible to configure
> the PVM this way?

You can configure your operating system. On Unix, do 'ulimit -m 200000'.

Regards,
Martin



More information about the Python-list mailing list