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

Bert Freudenberg bert at freudenbergs.de
Tue Oct 16 08:56:26 UTC 2007


On Oct 16, 2007, at 10:36 , Andrew Gaylard wrote:

> 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.

However, the garbage collector really is not up to the task of  
collecting multiple gigabytes of garbage.

> - 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).

I doubt that, you need to profile. I have not heard anyone reporting  
the 64 bit VM to be faster than the 32 bit version, on any machine.

> - 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!

Because nobody needs it (yet), and therefore nobody feels an urge to  
provide and maintain one.

Anyway, writing this up for future reference is needed, thanks for  
doing this. One thing you should watch out for though is to  
distinguish between a 64 bit VM and a 64 bit image, which are  
independent.

- Bert -




More information about the Vm-dev mailing list