[Vm-dev] Re: [Pharo-project] squeak VM 5.0
David T. Lewis
lewis at mail.msen.com
Thu Dec 17 12:10:29 UTC 2009
On Wed, Dec 16, 2009 at 05:32:37PM -0800, John M McIntosh wrote:
>
> Ok, well I created Mantis
> http://bugs.squeak.org/view.php?id=7430
> to document.
Good idea, thanks.
> Personally I would do
> Smalltalk wordSize
> versus
> SystemDictionary wordSize
I gather from Eliot's comment about using a class instance variable that
"SystemDictionary wordSize" would be preferred for performance. But
"Smalltalk wordSize" reads well and is easier to understand.
Ideally, I would view the word size as an attribute of the object memory,
hence "ObjectMemory wordSize". However, most images do not have class
ObjectMemory loaded, so perhaps
Object wordSize
to convey the intended meaning without requiring a dictionary lookup?
> Also the issue is when to change the WordSize variable.
>
> I think in
> SmalltalkImage>>snapshot: andQuit: embedded:
> right at the
> ifTrue: [self quitPrimitive].
> Cursor normal show.
> you want to set things so that wordSize is reset.
>
> At quit time you could do the reset before the
> "self quitPrimitive"
> then you know the value is reset and needs to be recalculated at startup time.
> or you can reset it before the
> Cursor normal show.
> which runs after startup time
>
> Somehow I think there is more risk resetting it after startup since I'm not sure
> when something could leap in wanting a valid value.
I would think that doing it immediately after the quitPrimitive would
be more reliable overall. It's simple, and if something did not work
you would know exactly where to look for the problem.
Dave
More information about the Vm-dev
mailing list