[Vm-dev] VM Maker: VMMaker.oscog-eem.296.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jun 6 19:37:43 UTC 2013
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.296.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.296
Author: eem
Time: 6 June 2013, 12:35:37.502 pm
UUID: ca2924d5-7bfb-4690-a7ce-9ec8d2222043
Ancestors: VMMaker.oscog-eem.295
Fix bug in eden filling/object overwrite checking. must use unsigned
vars in the fill loop.
=============== Diff against VMMaker.oscog-eem.295 ===============
Item was changed:
----- Method: NewObjectMemory>>allocateChunkAfterGC: (in category 'allocation') -----
allocateChunkAfterGC: byteSize
+ "Garbage collect and then allocate a chunk of the given size. Sender must be sure
- "Garbage colect and then allocate a chunk of the given size. Sender must be sure
that the requested size includes enough space for the header word(s)."
| newChunk enoughSpace |
<inline: true>
<var: #newChunk type: #usqInt>
enoughSpace := self sufficientSpaceToAllocate: byteSize.
enoughSpace ifFalse:
["signal that space is running low, but proceed with allocation if possible"
self setSignalLowSpaceFlagAndSaveProcess].
(self oop: freeStart + byteSize isGreaterThan: reserveStart) ifTrue:
[^0 "Allocation failed. Client should e.g. fail the primtive"].
+ "if we get here, there is enough space for allocation to succeed "
- "if we get here, there is enough space for allocation to succeed "
newChunk := freeStart.
freeStart := freeStart + byteSize.
^self oopForPointer: newChunk!
Item was changed:
----- Method: NewObjectMemory>>maybeFillWithAllocationCheckFillerFrom:to: (in category 'allocation') -----
maybeFillWithAllocationCheckFillerFrom: start to: end
+ "Fill free memory with a bit pattern for checking if the last object has been overwritten."
- "Fill free memory with a bit pattern for chekcing if the last object has been overwritten."
<inline: true>
+ <var: 'start' type: #usqInt>
+ <var: 'end' type: #usqInt>
+ <var: 'i' type: #usqInt>
AllocationCheckFiller ~= 0 ifTrue:
[start to: end by: BytesPerWord do:
[:i|
self longAt: i put: (AllocationCheckFiller = 16rADD4E55
ifTrue: [i]
ifFalse: [AllocationCheckFiller])]]!
More information about the Vm-dev
mailing list