[Vm-dev] VM Maker: VMMaker.oscog-eem.1402.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 30 00:46:23 UTC 2015


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1402.mcz

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

Name: VMMaker.oscog-eem.1402
Author: eem
Time: 29 June 2015, 5:43:57.101 pm
UUID: 6f030706-bed6-4c29-a2f7-5e3653737178
Ancestors: VMMaker.oscog-eem.1401

oops.

=============== Diff against VMMaker.oscog-eem.1401 ===============

Item was changed:
  ----- Method: SpurMemoryManager>>growOldSpaceByAtLeast: (in category 'growing/shrinking memory') -----
  growOldSpaceByAtLeast: minAmmount
  	"Attempt to grow memory by at least minAmmount.
  	 Answer the size of the new segment, or nil if the attempt failed."
  	| ammount headroom total |
  	<var: #segInfo type: #'SpurSegmentInfo *'>
  	"statGrowMemory counts attempts, not successes."
  	statGrowMemory := statGrowMemory + 1."we need to include overhead for a new object header plus the segment bridge."
  	ammount := minAmmount + (self baseHeaderSize * 2 + self bridgeSize).
  	"round up to the nearest power of two."
  	ammount := 1 << (ammount - 1) highBit.
  	"and grow by at least growHeadroom."
  	ammount := ammount max: growHeadroom.
  
  	"Now apply the maxOldSpaceSize limit, if one is in effect."
  	maxOldSpaceSize > 0 ifTrue:
  		[total := segmentManager totalBytesInSegments.
  		 total >= maxOldSpaceSize ifTrue:
  			[^nil].
  		 headroom := maxOldSpaceSize - total.
  		 headroom < ammount ifTrue:
  			[headroom < (minAmmount + (self baseHeaderSize * 2 + self bridgeSize)) ifTrue:
  				[^nil].
  			 ammount := headroom]].
  		 
  	^(segmentManager addSegmentOfSize: ammount) ifNotNil:
  		[:segInfo|
  		 self assimilateNewSegment: segInfo.
  		 "and add the new free chunk to the free list; done here
  		  instead of in assimilateNewSegment: for the assert"
  		 self addFreeChunkWithBytes: segInfo segSize - self bridgeSize at: segInfo segStart.
  		 self assert: (self addressAfter: (self objectStartingAt: segInfo segStart))
  					= (segInfo segLimit - self bridgeSize).
  		 self checkFreeSpace.
  		 segmentManager checkSegments.
+ 		 segInfo segSize]!
- 		 segInfo segSize]
- 	
- 
- maxOldSpaceSize
- totalBytesInSegments!



More information about the Vm-dev mailing list