VM Maker: VMMaker.oscogSPC-eem.2117.mcz

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

VM Maker: VMMaker.oscogSPC-eem.2117.mcz

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

==================== Summary ====================

Name: VMMaker.oscogSPC-eem.2117
Author: eem
Time: 28 January 2017, 12:58:43.099647 pm
UUID: 7130d9ac-7881-4086-8350-391ecc3d61c6
Ancestors: VMMaker.oscogSPC-eem.2116

Must guard against trying ot free zero bytes at the end of memory.

=============== Diff against VMMaker.oscogSPC-eem.2116 ===============

Item was changed:
  ----- Method: SpurPlanningCompactor>>freeFrom:upTo:previousPin: (in category 'private') -----
  freeFrom: toFinger upTo: limit previousPin: previousPinOrNil
  "Free from toFinger up to limit, dealing with a possible intervening run of pinned objects starting at previousPinOrNil."
  <inline: false>
  <var: 'limit' type: #usqInt>
  <var: 'toFinger' type: #usqInt>
  <var: 'previousPinOrNil' type: #usqInt>
  | effectiveToFinger pin nextUnpinned start seg |
  <var: 'nextUnpinned' type: #usqInt>
  <var: #seg type: #'SpurSegmentInfo *'>
  self cCode: [] inSmalltalk:
  [coInterpreter cr; cr; print: 'freeing at '; printHexnp: toFinger; print: ' up to '; printHexnp: limit; print: ' pin '; printHexnp: previousPinOrNil; cr].
  effectiveToFinger := toFinger.
  pin := previousPinOrNil.
  "If the range toFinger to limit spans segments but there is no pin (as when freeing to the end of memory)
  segment boundaries must still be observed.  So in this case use the nearest bridge above toFinger as the pin."
  pin ifNil:
  [seg := manager segmentManager segmentContainingObj: toFinger.
  seg segLimit < limit ifTrue:
  [pin := manager segmentManager bridgeFor: seg]].
  [pin notNil] whileTrue:
  [(start := manager startOfObject: pin) > toFinger ifTrue:
  [manager addFreeChunkWithBytes: start - effectiveToFinger at: effectiveToFinger].
  nextUnpinned := self unmarkPinnedObjectsAndFindFirstUnpinnedOrFreeEntityFollowing: pin.
  nextUnpinned >= limit ifTrue:
  effectiveToFinger := manager startOfObject: nextUnpinned.
  pin := self findNextMarkedPinnedAfter: nextUnpinned].
+ limit > effectiveToFinger ifTrue:
+ [manager addFreeChunkWithBytes: limit - effectiveToFinger at: effectiveToFinger]!
- manager addFreeChunkWithBytes: limit - effectiveToFinger at: effectiveToFinger!