[squeak-dev] The Trunk: System-eem.1359.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Jun 11 14:30:31 UTC 2022
Hi Eliot,
> + vmLimit := Smalltalk parameterAt: 67.
This leads to an MNU in my image. Did you mean: Smalltalk vmParameterAt: 67? :-)
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Samstag, 11. Juni 2022 01:32 Uhr
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: System-eem.1359.mcz
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1359.mcz
==================== Summary ====================
Name: System-eem.1359
Author: eem
Time: 10 June 2022, 4:32:43.464831 pm
UUID: 3485074c-6683-47b8-a79b-6a3723cbc7a0
Ancestors: System-eem.1358
Implement heapMemoryLimit correctly.
=============== Diff against System-eem.1358 ===============
Item was changed:
----- Method: SmalltalkImage>>heapMemoryLimit (in category 'memory space') -----
heapMemoryLimit
+ "If an old space memory-limit is in effect, answer it as an Integer number of bytes, otherwise, nil."
+ | vmLimit |
+ vmLimit := Smalltalk parameterAt: 67.
+ ^vmLimit isZero ifFalse: [vmLimit]!
- "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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220611/1b6df564/attachment.html>
More information about the Squeak-dev
mailing list
|