From: Piotr Sawicki Date: 2008-02-20T00:04:30+09:00 Subject: Re: GC error ? Rados��aw Bu��at wrote: > You refer to cycles inside method "leaker". But this method always > creates the same amount of objects so I don't see reason why ruby eats > more and more memory for each "leaker" call. Haw gc works ? Here is pseudocode: malloc_limit = 8_000_000 malloc_increase = 0; malloc(size) { malloc_increase += size; if (malloc_increase > malloc_limit) garbage_collect() } garbage_collect() { malloc_limit = malloc_limit + (malloc_increase - malloc_limit) * some_factor malloc_increase = 0 } -- Posted via http://www.ruby-forum.com/.