Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-30 Thread "Martin v. Löwis"
Evan Jones wrote: Sure. This should be done even for patches which should absolutely not be committed? Difficult question. I think the answer goes like this: "Patches that should absolutely not be committed should not be published at all". There are different shades of gray, of course - but people

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread Evan Jones
On Jan 24, 2005, at 18:16, Martin v. Löwis wrote: - please don't post patches here; post them to SF You may ask for comments here after you posted them to SF. Sure. This should be done even for patches which should absolutely not be committed? - please follow Python coding style. In particular,

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread "Martin v. Löwis"
Here my comments, from more general to more subtle: - please don't post patches here; post them to SF You may ask for comments here after you posted them to SF. - please follow Python coding style. In particular, don't write if ( available_arenas == NULL ) { but write if (available_aren

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread Rodrigo Dias Arruda Senra
[Evan Jones] : -- 2. Every N memory operations (or some other measurement of "time"), reset this value and calculate a moving average of the number of pages. This estimates the current memory requirements of the application. > The challenge is how to determine a good measurement of "t

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread Evan Jones
On Jan 24, 2005, at 7:00, Rodrigo Dias Arruda Senra wrote: Depending on the cost of arena allocation, it might help to define a lower threshold keeping a minimum of empty arena_objects permanently available. Do you think this can bring any speedup ? Yes, I think it might. I have to do some more b

Re: [Python-Dev] Improving the Python Memory Allocator

2005-01-24 Thread Rodrigo Dias Arruda Senra
Evan Jones wrote: This message is a follow up to a thread I started on python-dev back in October, archived here: First, there is slightly more overhead with programs that allocate a lot of memory, release it, then reallocate it. Summary of the changes: - When freeing a page, if the arena is co

[Python-Dev] Improving the Python Memory Allocator

2005-01-23 Thread Evan Jones
This message is a follow up to a thread I started on python-dev back in October, archived here: http://mail.python.org/pipermail/python-dev/2004-October/049480.html Basically, the problem I am trying to solve is that the Python memory allocator never frees memory back to the operating system. I