[Vm-dev] 64bit: "This interpreter (vers. 68000) cannot read image file (vers. 274877913446)."

Andrew Gaylard ag at computer.org
Tue Oct 16 08:36:23 UTC 2007


On 10/16/07, Andreas Raab <andreas.raab at gmx.de> wrote:
>
>
> Andrew Gaylard wrote:
> >
> > - For which hardware/OS combinations is there a 64-bit VM?
> > - Does this VM run both 32-bit and 64-bit images?
> > - How do I convert a 32-bit image to a 64-bit one?
> > - My OS allows a single process to grow to 3.75GB ; if I need a lot of
> >   objects can I use a 32-bit image / VM, or must I use a 64-bit one?
> > - What are the advantages/disadvantages to using 64-bits?
> > - Why isn't there an officially-released 64-bit image?
>
> This is great information. Feel like writing it up? I'm sure Ian can be
> convinced to put it into the right place.


I'd be glad to write it up.  However: I have only a vague idea of what
the answers are.  So I'd like some input, feedback, and corrections
from clued list members.

I'll make a start to get the ball rolling:

1. For which hardware/OS combinations is there a 64-bit VM?
- Linux on 64-bit architectures: x86-64, SPARC64, Alpha, Power64
- Solaris on x86-64 and SPARC64
- MacOS on Power64
- Windows (version?) on x86-64

2. Does this VM run both 32-bit and 64-bit images?
- All 64-bit VMs run both 32-bit and 64-bit images

3. How do I convert a 32-bit image to a 64-bit one?
- (no idea; is this even possible?)

4.My OS allows a single process to grow to 3.75GB ; if I need a lot of
  objects can I use a 32-bit image / VM, or must I use a 64-bit one?
- There have in the past been problems related to the so-called
"2-GB limit".  This is due to conversion to and from signed 32-bit
integers to 32-bit pointers in the VM code.  These issues should
be a thing of the past.  Use the most recently-released VM for your
platform, and report any problems that you see.

5. What are the advantages/disadvantages to using 64-bits?
- The first advantage is that your image size can be enormous.
If you need the size of your VM code + in-memory image to exceed
4 GB, then 64-bits is for you.  Note that it will take ages to write out
an image that's this big to disk.  The sort of applications that need
this are those which load a small(ish) image, and run code that
creates millions of objects, but don't save them back to disk in the
image.
- Another advantage is that certain architectures (e.g. the Alpha)
don't offer a 32-bit mode; they are 64-bit only.
- Another advantage is that when the 64-bit-VM is built, the C compiler
knows the ABI is different from the 32-bit ABI.  The x86-64 case is
an important example: the old i386 ABI offered few registers, used
i387 floating-point,  and passed parameters on the stack.  The x86-64
ABI has may more registers, has SSE, SSE2, etc for FP, and
passes parameters in registers where possible.  It also has additional
instructions (MMX et al).  All of this makes for a VM that runs faster
if the compiler is able to make use of it (and is told to at compile-time).
- A disadvantage to 64-bit code is that pointers are 8 bytes instead of
4; this means that (a) pointers take more space in RAM, (b) take
more memory bandwidth when the CPU loads and stores them, and
(c) take up valuable space in on-chip-caches.  For many users, the
upper 32 bits will always be zero, so it makes little sense to load,
process and store pointers that are double the size but only half-used.
For these users, 32-bits is a good choice.
- Another disadvantage is that most users use the 32-bit VM and a
32-bit image.  This combination is therefore widely tested, and
therefore more stable as a consequence.

6. Why isn't there an officially-released 64-bit image?
Watch this space!

As I said, I'm pretty unsure of the truth of what I've written above.
Please, VM developers, help me out with the real facts here.

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20071016/d729efba/attachment-0001.htm


More information about the Vm-dev mailing list