[Vm-dev] Why spaceOkay test needed?
adi at netstyle.ch
Mon Aug 20 18:38:07 UTC 2007
On Aug 20, 2007, at 18:37 , Andreas Raab wrote:
> Adrian Lienhard wrote:
>> Out of curiosity, does anybody know why in...
>> "Allocate a new fixed-size instance. Fail if the allocation
>> would leave less than lowSpaceThreshold bytes free. May cause a GC"
>> | class spaceOkay |
>> class := self stackTop.
>> "The following may cause GC!"
>> spaceOkay := self sufficientSpaceToInstantiate: class
>> indexableSize: 0.
>> self success: spaceOkay.
>> successFlag ifTrue: [ self push: (self instantiateClass: self
>> popStack indexableSize: 0) ]
>> ... there is the call to
>> #sufficientSpaceToInstantiate:indexableSize: although
>> #instantiateClass:indexableSize: also indirectly calls
> Where does it do that?
allocate:headerSize:h1:h2:h3:doFill:with: -> allocateChunk: ->
More information about the Vm-dev