Possible to set cpython heap size?

Irmen de Jong irmen.NOSPAM at xs4all.nl
Thu Feb 22 13:20:02 EST 2007


Andy Watson wrote:
>  > Why do you want that? And no, it is not possible. And to be honest:
> I have
>> no idea why e.g. the JVM allows for this.
>>
>> Diez
> 
> The reason why is simply that I know roughly how much memory I'm going
> to need, and cpython seems to be taking a fair amount of time

                        ^^^^^
> extending its heap as I read in content incrementally.

First make sure this is really the case.
It may be that you are just using an inefficient algorithm.
In my experience allocating extra heap memory is hardly ever
noticeable. Unless your system is out of physical RAM and has
to swap.

--Irmen



More information about the Python-list mailing list