RTS -I switch

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Nov 17 07:22:16 EST 2006

Hello Simon,

Tuesday, November 14, 2006, 1:19:45 PM, you wrote:

>> i still forget to ask: if my program is idle during long time, is GC
>> will occur each 0.3 seconds or GHC is smart enough to check that no
>> much memory was allocated after last GC?

> You'll only get one GC.  Or at least that's the theory: I remember seeing cases
> where one GC caused a finalizer to be created, which in turn triggered another
> idle GC (because the heap had changed), which in turn created a new finalizer,
> and so on.  If you see something like this, we should investigate.

well, how about this scenario for GUI program: user thinks and GC
occurs, then user performs some simple action (say, move cursor to
another line) and thinks again. new GC will occur at this moment,
right? and counting that in my program major GC could be up to several
seconds, this may make program very unresponsive

well, i don't tried this, just imagined. may be better strategy for
automatic GC invocation will be checking ratio of used memory/memory
used after last GC and perform automatic GC, say, only when this ratio
grows to value more than 1.2?

(yes, i know that autoGCing can be just turned off)

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Glasgow-haskell-users mailing list