<div dir="ltr">I have no idea why TTFileDescription>>profileAll was removed, I didn't intend to.  I may need to resubmit this.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 31, 2022 at 5:50 PM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Chris Muller uploaded a new version of System to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/System-cmm.1353.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/System-cmm.1353.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: System-cmm.1353<br>
Author: cmm<br>
Time: 31 May 2022, 5:50:31.586558 pm<br>
UUID: 52f9f789-3ad3-4ec7-914f-85f05ecaaead<br>
Ancestors: System-mt.1352<br>
<br>
Added SmalltalkImage>>#heapMemoryLimit to access the -memory or -maxoldspace arguments passed to the vm.<br>
<br>
=============== Diff against System-mt.1352 ===============<br>
<br>
Item was added:<br>
+ ----- Method: SmalltalkImage>>heapMemoryLimit (in category 'memory space') -----<br>
+ heapMemoryLimit<br>
+       "If a memory-limiting argument to the vm was supplied (-memory or -maxoldspace), answer it as an Integer number of bytes, otherwise, nil."<br>
+       | foundMemoryArg |<br>
+       foundMemoryArg := false.<br>
+       Smalltalk optionsDo: <br>
+               [ : each | <br>
+               (#('-memory' '--memory' '-maxoldspace' '--maxoldspace') includes: each)<br>
+                       ifTrue: [ foundMemoryArg := true ]<br>
+                       ifFalse: <br>
+                               [ foundMemoryArg ifTrue: <br>
+                                       [ | arg |<br>
+                                       arg := each.<br>
+                                       "The memory arg is expected to be a number that ends in k, m, or g."<br>
+                                       (arg isEmptyOrNil or: [ arg size < 2 ]) ifFalse: <br>
+                                               [ | requestedMemory |<br>
+                                               requestedMemory := (arg  copyFrom: 1 to: arg size - 1) asNumber.<br>
+                                               requestedMemory > 0 ifTrue: <br>
+                                                       [ ^ requestedMemory * (arg last<br>
+                                                               caseOf:<br>
+                                                                       { [$k] -> [1000].  [$K] -> [1000].<br>
+                                                                       [$m] -> [1e6].  [$M] -> [1e6].<br>
+                                                                       [$g] -> [1e9].  [$G] -> [1e9] }<br>
+                                                               otherwise: [^nil]) ] ] ] ] ].<br>
+       ^ nil!<br>
<br>
Item was removed:<br>
- ----- Method: TTFileDescription>>profileAll (in category '*System-Tools-profiling') -----<br>
- profileAll<br>
-       "Profile reading all the glyphs"<br>
-       MessageTally spyOn:[<br>
-               1 to: numGlyphs do:[:glyphIndex| self readGlyphAt: glyphIndex-1].<br>
-       ].!<br>
<br>
<br>
</blockquote></div>