[squeak-dev] The Inbox: System-dtl.1254.mcz
David T. Lewis
lewis at mail.msen.com
Wed Dec 1 23:30:40 UTC 2021
Committed to trunk in System-dtl.1261. The original System-dtl.1254
is moved from inbox to the treated inbox.
Dave
On Fri, Nov 26, 2021 at 11:08:25AM -0500, David T. Lewis wrote:
> Putting this in the inbox for review in case there may be some
> performance impact (I don't think so, but better to be safe).
>
> Dave
>
>
> On Fri, Nov 26, 2021 at 04:06:22PM +0000, commits at source.squeak.org wrote:
> > A new version of System was added to project The Inbox:
> > http://source.squeak.org/inbox/System-dtl.1254.mcz
> >
> > ==================== Summary ====================
> >
> > Name: System-dtl.1254
> > Author: dtl
> > Time: 26 November 2021, 11:06:19.584405 am
> > UUID: 3856329c-1404-4bd5-9b94-d9c47f663d7c
> > Ancestors: System-mt.1253
> >
> > Let vmParameterAt:ifAbsent: treat nil as an absent parameter. Previously only out of range parameter requests were treated as absent.
> >
> > Handles the case of parameter 54 which is numeric for Spur VM, nil for Cog VM, and out of range for interpreter VM. Update bytesUsedString to use 0 as default for parameter 54.
> >
> > =============== Diff against System-mt.1253 ===============
> >
> > Item was changed:
> > ----- Method: SmalltalkImage>>bytesUsedString (in category 'memory space') -----
> > bytesUsedString
> > "Answer a string describing the amount of memory in use."
> > "Smalltalk bytesUsedString"
> > | totalUsed |
> > totalUsed := (self vmParameterAt: 2 "used eden + used past space")
> > + + ((self vmParameterAt: 1 "old space size")
> > + - (self vmParameterAt: 54 ifAbsent: 0 "free old space")).
> > - + ((self vmParameterAt: 1 "old space size") - (self vmParameterAt: 54 "free old space")).
> > ^totalUsed asStringWithCommas, ' bytes in use'!
> >
> > Item was changed:
> > ----- Method: SmalltalkImage>>vmParameterAt:ifAbsent: (in category 'vm parameters') -----
> > vmParameterAt: parameterIndex ifAbsent: defaultValueOrBlock
> > + "Answer a VM parameter or defaultValueOrBlock value if out of range
> > + or if the VM does not provide a value for this parameter. A VM parameter
> > + is typically numeric or boolean, and if not implemented will be nil."
> > + ^ [(self vmParameterAt: parameterIndex)
> > + ifNil: defaultValueOrBlock value]
> > - "Answer a VM parameter or defaultValueOrBlock value if out of range."
> > - ^ [self vmParameterAt: parameterIndex]
> > on: Error
> > do: [defaultValueOrBlock value]!
> >
> >
>
More information about the Squeak-dev
mailing list
|