64 bit images

Jecel Assumpcao Jr jecel at merlintec.com
Sat Apr 3 01:23:26 UTC 2004


On Friday 02 April 2004 15:22, Tim Rowledge wrote:
> Dan Ingalls <Dan at SqueakLand.org> wrote:
> > A related topic is general compatibility.  It would be nice if...
> >
> > 	A 64-bit VM could read in a 32-bit image
> > 	This would mean we wouldn't have to store separate 64-bit images
> > 	for every release.

Trivial, since a 48 bit (for example) LargeInteger would not cause any 
problems for a 64 bit VM.

> > 	A 64-bit Squeak could read in a 32-bit image segment (ie project)
> > 	This would offer at least one-way sharing of projects.

Same thing.

> > 	A V4 Squeak could read in a V3 imageSegment
> > 	This would carry forward all current projects to V4

This isn't hard to do in any case, but can be even easier if the V4 
format is designed with this in mind.

> Betcha that 9 times out of 10 an image used on a 64bit machine could
> be written out as a '32bit' image. Anytime the object space is some
> suitable size (let's say 1Gb for now) then the oops could be munged
> down and the remaining hard work woud be checking all SmallInts to
> make sure they fit into 31 bits. 64bit addresses stored in byte
> arrays or whatever would be troublesome perhaps but then if you do
> that sort of thing you deserve problems.
>
> It might be easier to do it via a SystemTracer than in the VM though.

True, and reading V3 imageSegments could also be done as a Squeak-level 
application with no VM support at all.

Compatibility does have its downside - you don't get to play with neat 
ideas like large (more than 1 bit) type tags or capability support via 
random 64 bit pointers (you allocate a bunch of objects somewhere in 
the virtual space and it isn't practical for a program that doesn't 
have access to the MMU tables to search for them).

Back to the compression issue - my design is constrained by my need to 
be able to compress/uncompress single objects. For whole images or 
segments Zip might be the best answer. One trick I used that could also 
help whole-image-zipping is to store relative pointers. That is, in 
each field you put a value that when added to the current object's base 
address will give the actual pointer to the other object.

-- Jecel



More information about the Squeak-dev mailing list