# New Ticket Created by Leopold Toetsch # Please include the string: [perl #17702] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17702 >
This patch stops parrot from permanently allocating increasing amounts of memory: Please try this: $ cd languages/perl6 $ perl6 -B examples/life.p6 $ cd - $ ./parrot -d languages/perl6/examples/life.p6 N where N is e.g. 1, 10, 100, 1000 and watch memory usage of parrot and allocated memory reported by -d. I tried different things to fix this (e.g correcting the statistics by sizeof(struct Memory_Block), omitting the additional allocated 32 bytes (what are they used for?) - but this all didn't help. Please apply, leo -- attachment 1 ------------------------------------------------------ url: http://rt.perl.org/rt2/attach/38993/31664/d621a2/resources_c.patch
--- parrot/resources.c Mon Sep 9 11:42:20 2002 +++ parrot-leo/resources.c Tue Oct 1 09:08:58 2002 @@ -197,7 +197,11 @@ cur_block = cur_block->prev; } } + /* this makes for ever increasing allocations but + * fewer collect runs */ +#ifdef WE_WANT_EVER_GROWING_ALLOCATIONS total_size += pool->minimum_block_size; +#endif /* Snag a block big enough for everything */ new_block = alloc_new_block(interpreter, total_size, pool);