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! |
Hi Levente,
not really fewer full GCs in my image. :-/ Best, Marcel |
Hi Marcell,
Is it exactly the same or just slightly fewer? What's Smalltalk vmParameterAt: 25? Levente On Fri, 8 Apr 2016, marcel.taeumel wrote: > Hi Levente, > > not really fewer full GCs in my image. :-/ > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Inbox-Kernel-ul-1014-mcz-tp4889141p4889146.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > |
And what's the return value of Smalltalk garbageCollect?
Levente On Fri, 8 Apr 2016, Levente Uzonyi wrote: > Hi Marcell, > > Is it exactly the same or just slightly fewer? > What's Smalltalk vmParameterAt: 25? > > Levente > > On Fri, 8 Apr 2016, marcel.taeumel wrote: > >> Hi Levente, >> >> not really fewer full GCs in my image. :-/ >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/The-Inbox-Kernel-ul-1014-mcz-tp4889141p4889146.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > > |
Free forum by Nabble | Edit this page |