At 11:28 PM +0200 6/21/08, none wrote:
>Instead of collecting objects after a fixed number of allocations (700)
...
I've seen this asserted several times in this thread: that GC is done
every fixed number of allocations. This is not correct. GC is done when
the surplus of allocations less deal
Instead of collecting objects after a fixed number of allocations (700)
You could make it dynamic like this:
# initial values
min_allocated_memory = 0
max_allocated_memory = 0
next_gc_run = 1024 * 1024
def manage_memory():
allocated_memory = get_allocated_memory()
min_allocated_memory =