[Vm-dev] What is a free object

Mathieu Suen mathk.sue at gmail.com
Thu Jul 26 12:01:08 UTC 2007


Hi,

I was reading the code of the nextInstance primitive and  to  
undertand I need to know what is a FreeObject:

firstAccessibleObject
	"Return the first accessible object in the heap."
	| obj |
	obj := self firstObject.
	[obj < endOfMemory]
		whileTrue: [(self isFreeObject: obj) ifFalse: [^ obj].
			obj := self objectAfter: obj].
	self error: 'heap is empty'

isFreeObject: oop

	^ (self headerType: oop) = HeaderTypeFree



Why are they inside the image? When are they created?
Thanks

	Mth





More information about the Vm-dev mailing list