Oh sure Bill you're violating rule (a).  In squeak a full finalization pass is 
require to finalize all objects. 
This runs in to the Pharo's desire to only do incremental GCs and avoid a full 
GC. 

SystemDictionary>>setGCParameters

       Smalltalk setGCBiasToGrowGCLimit: 16*1024*1024.
       Smalltalk setGCBiasToGrow: 1.

Which means that the image is happy to lurch around with a 16MB working space. 
Once that is exceeded then a full GC will occur. 
(yes yes, it's more complex that that, but it's just easier to say that's kinda 
what happens).  The trade is deferring a full GC at the cost
of deferring some finalized objects.... 

Frankly the default values for vmParameterAt:  5,6,24,25  I think are quite 
fictional based on desktop/laptop machines used in this decade, 
those values come from the era of 16Mhz 68030 macintosh SE/30 machines.  
However I do see that in initializeMemorySettingsProfileSeaSide
someone picked more rational numbers but I think it's time that we clean those 
up this whole area.  

Doing this won't solve your finalization timing problem, in fact it might make 
it even longer or never since the objective would be to avoid a full GC,
and deal with the occasional "pig in the snake" issue. 

I've not looked but Squeak images might not invoke setGCBiasToGrowGCLimit: so 
they would be more prone to invoking a full GC. 

For WikiServer on the iPhone I fiddled with a custom memory policy that 
attempts to avoid a full GC as long as possible since a full GC 
pass is measured on an ipod touch in nearly thousands of milliseconds. 

On 2010-01-06, at 12:45 PM, Schwab,Wilhelm K wrote:

> 
> John,
> 
> I realize you are being helpful and appreciate same.  However, I am not 
> violating anything; I am simply noting that Pharo is probably not finalizing 
> objects nearly as soon as it could.  My expectations (and awareness that it 
> is not always immediate) come from Dolphin.
> 
> Bill
> 
> 
> -----Original Message-----
> From: pharo-project-boun...@lists.gforge.inria.fr 
> [mailto:pharo-project-boun...@lists.gforge.inria.fr] On Behalf Of John M 
> McIntosh
> Sent: Wednesday, January 06, 2010 3:28 PM
> To: Pharo-project@lists.gforge.inria.fr
> Subject: Re: [Pharo-project] Finalization quirk
> 
> Bill, I always tell people
> 
> (a) finalization will occur later, not when you think it should
> (b) finalization will occur slower/faster than you think. 
> (c) both (a) & (b) will vary
> 
> You're violating (a)
> 
> There is mention of doing a full GC will force the finalization, but I can't 
> recall if that finalizes (all) objects in old oops space in one pass with 
> squeak. 
> Various Smalltalk flavours and versions do things differently, some at 
> different times & versions perhaps would only finalize one oops per pass 
> (visualage).
> 
> 
> On 2010-01-06, at 10:12 AM, Schwab,Wilhelm K wrote:
> 
>> I am trying to add finalization to something and appear to be at a point 
>> that finalization does not happen until I open the process browser.  Any 
>> ideas?
>> 
>> Bill
>> 
>> 
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project@lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> 
> --
> ===========================================================================
> John M. McIntosh <john...@smalltalkconsulting.com>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
> 
> 
> 
> 
> 
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
===========================================================================
John M. McIntosh <john...@smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to