From: Masato KIYAMA Date: 2000-11-22T08:07:47+09:00 Subject: [ruby-talk:6511] Re:question about memory usage of a script Hi, > The following script uses more memory as N gets bigger. Should I > expect it to run in constant space? If not, what do I need to know to > understand how the GC reclaims memory? I'd like to know, so I can get > an idea of the memory usage of a long-running process, like a server > written in Ruby. I think that this script will run constant space, but constant space is GC_MALLOC_LIMIT(2 or 8 Mbytes). Ruby's GC(ruby-1.6.1) start, if * freelist is empty * malloc_memories > GC_MALLOC_LIMIT * malloc request fails. So, if N is 10 or 20, GC does not execute. if GC.start use after test(), constant space is small. --- masato