[Vm-dev] primitiveSetGCSemaphore puzzle

Igor Stasenko siguctua at gmail.com
Thu Aug 18 01:16:15 UTC 2011


On 18 August 2011 03:10, John McIntosh <johnmci at smalltalkconsulting.com> wrote:
>
> 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.
>
Well, but doesn't it duplicating the Finalization semaphore?
It is also signaled when GC is performed.. so i don't see a reason to
signal same event twice by VM.

> 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
> ===========================================================================
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list