Chris Muller uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-cmm.1353.mcz
==================== Summary ====================
Name: System-cmm.1353 Author: cmm Time: 31 May 2022, 5:50:31.586558 pm UUID: 52f9f789-3ad3-4ec7-914f-85f05ecaaead Ancestors: System-mt.1352
Added SmalltalkImage>>#heapMemoryLimit to access the -memory or -maxoldspace arguments passed to the vm.
=============== Diff against System-mt.1352 ===============
Item was added: + ----- Method: SmalltalkImage>>heapMemoryLimit (in category 'memory space') ----- + heapMemoryLimit + "If a memory-limiting argument to the vm was supplied (-memory or -maxoldspace), answer it as an Integer number of bytes, otherwise, nil." + | foundMemoryArg | + foundMemoryArg := false. + Smalltalk optionsDo: + [ : each | + (#('-memory' '--memory' '-maxoldspace' '--maxoldspace') includes: each) + ifTrue: [ foundMemoryArg := true ] + ifFalse: + [ foundMemoryArg ifTrue: + [ | arg | + arg := each. + "The memory arg is expected to be a number that ends in k, m, or g." + (arg isEmptyOrNil or: [ arg size < 2 ]) ifFalse: + [ | requestedMemory | + requestedMemory := (arg copyFrom: 1 to: arg size - 1) asNumber. + requestedMemory > 0 ifTrue: + [ ^ requestedMemory * (arg last + caseOf: + { [$k] -> [1000]. [$K] -> [1000]. + [$m] -> [1e6]. [$M] -> [1e6]. + [$g] -> [1e9]. [$G] -> [1e9] } + otherwise: [^nil]) ] ] ] ] ]. + ^ nil!
Item was removed: - ----- Method: TTFileDescription>>profileAll (in category '*System-Tools-profiling') ----- - profileAll - "Profile reading all the glyphs" - MessageTally spyOn:[ - 1 to: numGlyphs do:[:glyphIndex| self readGlyphAt: glyphIndex-1]. - ].!
I have no idea why TTFileDescription>>profileAll was removed, I didn't intend to. I may need to resubmit this.
On Tue, May 31, 2022 at 5:50 PM commits@source.squeak.org wrote:
Chris Muller uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-cmm.1353.mcz
==================== Summary ====================
Name: System-cmm.1353 Author: cmm Time: 31 May 2022, 5:50:31.586558 pm UUID: 52f9f789-3ad3-4ec7-914f-85f05ecaaead Ancestors: System-mt.1352
Added SmalltalkImage>>#heapMemoryLimit to access the -memory or -maxoldspace arguments passed to the vm.
=============== Diff against System-mt.1352 ===============
Item was added:
- ----- Method: SmalltalkImage>>heapMemoryLimit (in category 'memory
space') -----
- heapMemoryLimit
"If a memory-limiting argument to the vm was supplied (-memory or
-maxoldspace), answer it as an Integer number of bytes, otherwise, nil."
| foundMemoryArg |
foundMemoryArg := false.
Smalltalk optionsDo:
[ : each |
(#('-memory' '--memory' '-maxoldspace' '--maxoldspace')
includes: each)
ifTrue: [ foundMemoryArg := true ]
ifFalse:
[ foundMemoryArg ifTrue:
[ | arg |
arg := each.
"The memory arg is expected to be
a number that ends in k, m, or g."
(arg isEmptyOrNil or: [ arg size <
2 ]) ifFalse:
[ | requestedMemory |
requestedMemory := (arg
copyFrom: 1 to: arg size - 1) asNumber.
requestedMemory > 0
ifTrue:
[ ^
requestedMemory * (arg last
caseOf:
{
[$k] -> [1000]. [$K] -> [1000].
[$m] -> [1e6]. [$M] -> [1e6].
[$g] -> [1e9]. [$G] -> [1e9] }
otherwise:
[^nil]) ] ] ] ] ].
^ nil!
Item was removed:
- ----- Method: TTFileDescription>>profileAll (in category
'*System-Tools-profiling') -----
- profileAll
"Profile reading all the glyphs"
MessageTally spyOn:[
1 to: numGlyphs do:[:glyphIndex| self readGlyphAt:
glyphIndex-1].
].!
Hi Chris --
I may need to resubmit this.
No worries. This is some issue with a deprecated extension. We do not need this anymore. It sits safe and sound in 60Deprecated.
Best, Marcel Am 01.06.2022 02:33:43 schrieb Chris Muller asqueaker@gmail.com: I have no idea why TTFileDescription>>profileAll was removed, I didn't intend to. I may need to resubmit this.
On Tue, May 31, 2022 at 5:50 PM <commits@source.squeak.org [mailto:commits@source.squeak.org]> wrote:
Chris Muller uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-cmm.1353.mcz [http://source.squeak.org/inbox/System-cmm.1353.mcz]
==================== Summary ====================
Name: System-cmm.1353 Author: cmm Time: 31 May 2022, 5:50:31.586558 pm UUID: 52f9f789-3ad3-4ec7-914f-85f05ecaaead Ancestors: System-mt.1352
Added SmalltalkImage>>#heapMemoryLimit to access the -memory or -maxoldspace arguments passed to the vm.
=============== Diff against System-mt.1352 ===============
Item was added: + ----- Method: SmalltalkImage>>heapMemoryLimit (in category 'memory space') ----- + heapMemoryLimit + "If a memory-limiting argument to the vm was supplied (-memory or -maxoldspace), answer it as an Integer number of bytes, otherwise, nil." + | foundMemoryArg | + foundMemoryArg := false. + Smalltalk optionsDo: + [ : each | + (#('-memory' '--memory' '-maxoldspace' '--maxoldspace') includes: each) + ifTrue: [ foundMemoryArg := true ] + ifFalse: + [ foundMemoryArg ifTrue: + [ | arg | + arg := each. + "The memory arg is expected to be a number that ends in k, m, or g." + (arg isEmptyOrNil or: [ arg size < 2 ]) ifFalse: + [ | requestedMemory | + requestedMemory := (arg copyFrom: 1 to: arg size - 1) asNumber. + requestedMemory > 0 ifTrue: + [ ^ requestedMemory * (arg last + caseOf: + { [$k] -> [1000]. [$K] -> [1000]. + [$m] -> [1e6]. [$M] -> [1e6]. + [$g] -> [1e9]. [$G] -> [1e9] } + otherwise: [^nil]) ] ] ] ] ]. + ^ nil!
Item was removed: - ----- Method: TTFileDescription>>profileAll (in category '*System-Tools-profiling') ----- - profileAll - "Profile reading all the glyphs" - MessageTally spyOn:[ - 1 to: numGlyphs do:[:glyphIndex| self readGlyphAt: glyphIndex-1]. - ].!
squeak-dev@lists.squeakfoundation.org