[squeak-dev] The Inbox: Kernel-ul.1014.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Apr 8 16:37:54 UTC 2016


Levente Uzonyi uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-ul.1014.mcz

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

Name: Kernel-ul.1014
Author: ul
Time: 8 April 2016, 6:32:46.797344 pm
UUID: 7be073b0-6c2b-461d-a836-3031dc02743d
Ancestors: Kernel-mt.1013

- before doing a full GC, try an incremental one when primitive 71 fails. This is expected to reduce the number of full GCs when large chunks of memory are being allocated repeatedly

=============== Diff against Kernel-mt.1013 ===============

Item was changed:
  ----- Method: Behavior>>handleFailingBasicNew (in category 'private') -----
  handleFailingBasicNew
  	"handleFailingBasicNew gets sent after basicNew has failed and allowed
  	 a scavenging garbage collection to occur.  The scavenging collection
  	 will have happened as the VM is activating the (failing) basicNew.  If
  	 handleFailingBasicNew fails then the scavenge failed to reclaim sufficient
  	 space and a global garbage collection is required.  Retry after garbage
  	 collecting and growing memory if necessary.
  
  	 Primitive. Answer an instance of this class with the number of indexable
  	 variables specified by the argument, sizeRequested.  Fail if this class is not
  	 indexable or if the argument is not a positive Integer, or if there is not
  	 enough memory available. Essential. See Object documentation whatIsAPrimitive."
  
  	<primitive: 70>
+ 	Smalltalk garbageCollectMost < 1048576 ifTrue:
+ 		[Smalltalk garbageCollect < 1048576 ifTrue:
+ 			[Smalltalk growMemoryByAtLeast: 1048576]].
- 	Smalltalk garbageCollect < 1048576 ifTrue:
- 		[Smalltalk growMemoryByAtLeast: 1048576].
  	^self handleFailingFailingBasicNew "retry after global garbage collect"!

Item was changed:
  ----- Method: Behavior>>handleFailingBasicNew: (in category 'private') -----
  handleFailingBasicNew: sizeRequested
  	"handleFailingBasicNew: gets sent after basicNew: has failed and allowed
  	 a scavenging garbage collection to occur.  The scavenging collection
  	 will have happened as the VM is activating the (failing) basicNew:.  If
  	 handleFailingBasicNew: fails then the scavenge failed to reclaim sufficient
  	 space and a global garbage collection is required.  Retry after garbage
  	 collecting and growing memory if necessary.
  
  	 Primitive. Answer an instance of this class with the number of indexable
  	 variables specified by the argument, sizeRequested.  Fail if this class is not
  	 indexable or if the argument is not a positive Integer, or if there is not
  	 enough memory available. Essential. See Object documentation whatIsAPrimitive."
  
  	<primitive: 71>
  	| bytesRequested |
  	bytesRequested := self byteSizeOfInstanceOfSize: sizeRequested.
+ 	Smalltalk garbageCollectMost < bytesRequested ifTrue:
+ 		[Smalltalk garbageCollect < bytesRequested ifTrue:
+ 			[Smalltalk growMemoryByAtLeast: bytesRequested]].
- 	Smalltalk garbageCollect < bytesRequested ifTrue:
- 		[Smalltalk growMemoryByAtLeast: bytesRequested].
  	"retry after global garbage collect and possible grow"
  	^self handleFailingFailingBasicNew: sizeRequested!



More information about the Squeak-dev mailing list