[squeak-dev] The Inbox: System-cmm.1353.mcz

Chris Muller asqueaker at gmail.com
Wed Jun 1 00:32:54 UTC 2022


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 at 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].
> -       ].!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220531/25c0ece8/attachment.html>


More information about the Squeak-dev mailing list