(original) (raw)
On 06/04/2017 01:18 PM, Tim Peters wrote:
\[Larry Hastings \]... 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