[Python-Dev] The untuned tunable parameter ARENA_SIZE

Larry Hastings larry at hastings.org
Mon Jun 5 18:55:40 EDT 2017


On 06/04/2017 01:18 PM, Tim Peters wrote:
> [Larry Hastings <larry at hastings.org>]
>> ...
>> Yet CPython's memory consumption continues to grow.  By the time a current
>> "trunk" build of CPython reaches the REPL prompt it's already allocated 16
>> arenas.
> I'd be surprised if that's true ;-)  The first time `new_arena()` is
> called, it allocates space for a vector of 16 (INITIAL_ARENA_OBJECTS)
> `arena_object` structs.  Those are tiny, and hold bookkeeping info for
> the actual arenas, none of which are allocated at first.

Oh!  I thought it also allocated the arenas themselves, in a loop.  I 
thought I saw that somewhere.  Happy to be proved wrong...

> So at most 9 arenas ("highwater mark") were ever simultaneously allocated..

... though not completely off-base.


On 06/04/2017 11:50 AM, Tim Peters wrote:
> I was hoping to spur a discussion of much higher level issues.  I bet
> Larry was too ;-)

Actually I was hoping everyone would just tell me how right I was and 
thank me for my profound insights.


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170605/1a392911/attachment.html>


More information about the Python-Dev mailing list