[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] forking and GC

From: Paolo Bonzini
Subject: Re: [Help-smalltalk] forking and GC
Date: Mon, 24 Nov 2003 18:08:18 +0100

Thanks for all the reports.  Be sure I'll consider them.

> st> [ [ 1 = 1 ] whileTrue: [ 'arensito' printNl ] ] fork!
> A simple test like this is quite peculiar;
> At first, it executes right up until garbage collection takes place,
> then stops.
> The second time it is called, it runs forever as expected.

You cannot expect a process to run forever unless it is the one that you
typed in the read-eval-print loop.  What's happening is that your process is
preempting the forking one.  When GC happens, it turns out that some objects
need to be finalized, so the finalizer process pops up.  When it ends, the
forking process (in perfect round-robin style...) wakes up again and returns
.  Now, when you type anything else, you have *two* processes running:
actually I guess that "Processor yield" will restart the flow of arensitos
(but I may be wrong).

GCing explicitly can be done with methods on the class side of ObjectMemory,
like "ObjectMemory compact", but is not a solution because the finalizer may
pop up at any time.  The solution is to do the job in the interactive
process, or to put the interactive process to sleep with a "Processor
activeProcess suspend".

Can you please verify your bug reports without the JIT?  I plan to fix the
bugs anyway, but if they are in the GC they are much more serious.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]