cyclic looping with [0 == object] whileFalse: [object :=
objectnextObject].
Mathieu Suen
mathk.sue at gmail.com
Mon Nov 5 22:43:44 UTC 2007
On Nov 5, 2007, at 8:18 PM, John M McIntosh wrote:
>
> On Nov 5, 2007, at 10:44 AM, Rob Withers wrote:
>
>> I thought of a possibility. It could be that I am creating
>> objects (BlockContexts and MethodContexts) as fast as I process
>> them in this loop. If the loop is creating objects, then they are
>> bound to be at the end of memory and I am bound to not be able to
>> catch up to them. In this case, my #ifTrue: msg is a real msg
>> creating a real BlockContext each time through the loop, because
>> of my Compiler changes, and the associated MethodContexts are
>> being created too. (My addition of anOrderedCollection>>#add:/
>> #addLast:/#grow... are being recorded as well). Each time through
>> a new instance of the BlockContext is being created.
>>
>> That sucks. I can't do anything about it.
>
> As an optimization methodContexts are recycled and reused, this
> feature decreases the time take
> to make a new context. When a method returns the local context is
> then stuffed onto the free context chain.
> However on a GC the free context chain is GCed also. So usually you
> are not making a new object (MethodContexts ) for the message
> activation.
But MethodContext are no more recyvled when thisContext is push one
the stack:
pushActiveContextBytecode
"Puts reclaimability of this context in question."
self fetchNextBytecode.
reclaimableContextCount := 0.
self internalPush: activeContext.
And context are puch on the stack when a block is create.
Mth
>
>
> --
> ======================================================================
> =====
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd. http://
> www.smalltalkconsulting.com
> ======================================================================
> =====
>
>
>
More information about the Squeak-dev
mailing list
|