[Vm-dev] primitiveSetGCSemaphore puzzle

John McIntosh johnmci at smalltalkconsulting.com
Thu Aug 18 00:10:36 UTC 2011


That is there to allow the Sophie Memory Policy to aggressively
collect statistical data after every scavenge so it could make
decisions about when to tenure everything to avoid excessive  remember
table scanning.
That or do a peek every N seconds.

You've noticed the low adoption rate.


On Wed, Aug 17, 2011 at 9:46 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>
> I am a bit puzzled with this primitive.
> There is no sender of #setGCSemaphore: semaIndex in image,
>
> and VM seems like using it for signaling semaphore as a post-GC action.
>
> I expected that it is finalization process, which should use that
> guy.. but no, it just using special objects array indice:
>
> restartFinalizationProcess
>
> ...
>        FinalizationSemaphore := Smalltalk specialObjectsArray at: 42.
> ...
>
> Apparentlly , each time we have GC, the finalization semaphore is signaled.
>
> So, it makes me wonder, how it working because i see that VM signals
> semaphore in postGCAction, which should be set by the mentioned
> primitive.
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>



-- 
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================


More information about the Vm-dev mailing list