memory and VM issues (interp.c part 1 of 2 attached)

David T. Lewis lewis at
Fri Aug 5 11:20:16 UTC 2005

On Thu, Aug 04, 2005 at 10:47:23PM -0700, John M McIntosh wrote:
> Ah, well Ian was making changes to code that VMMaker manages, Andreas  
> was making changes, and I was making changes. (Let alone Tim)
> These where all combined into various versions of VMMaker.tpr.xx as  
> official combined (somewhat tested) sync points into various versions  
> of the official images.
> So by working with Ian's private ./dist3 image you worked with an  
> image out of sync with the VM that contained things the Image cared  
> about.
> I'll note the official image only seems to look at wordSize for  
> deciding if it should build a 32 versus 64 bit VM in VMMaker
> So what does the ./dist3 image use wordSize for?

It's used in CompiledMethod>>initialPC, which is:

  "Answer the program counter for the receiver's first bytecode."

  ^ (self numLiterals + 1) * Smalltalk wordSize + 1

There are other image side changes as well in Dan's image side
updates. They are available on the "64 bit Unix Squeak" web site, which says that they are a
required part of 64 bit Squeak.

Since the image side changes are required for 64 bit Squeak, and
also work for 32 bit Squeak, I guess I just assumed that the
vm-dev folks were all using them.

It sounds like somebody needs to "adopt" Dan's change sets and
either get them into the mainstream images, or maintain them as
a SqueakMap package until they are incorporated in the image.
And also of course to make that one small change to
SystemDictionary>>wordSize to bring it back into sync with
the more recent VMMaker code.

I'm attaching the trival change just so it does not get lost,
with CC to Dan and Ian.


Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="WordSizeVMParameterFix-dtl.1.cs"

'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6548] on 5 August 2005 at 7:13:24 am'!
"Change Set:		WordSizeVMParameterFix-dtl
Date:			5 August 2005
Author:			David T. Lewis

This is an update to VMM38b4-64bit-image1-ikp.1.cs. The image wordSize VM parameter has changed from parameter number 27 to 40 in the VM. This brings the image back in sync with the VM.

!SystemDictionary methodsFor: 'sources, change log' stamp: 'dtl 8/5/2005 06:43'!
	"Answer the size (in bytes) of an object pointer."
	"Smalltalk wordSize"

	^[SmalltalkImage current vmParameterAt: 40] on: Error do: [4]! !

More information about the Vm-dev mailing list