[squeak-dev] 64Bit image on Squeak Cocoa 5.7.4 VM
Tobias Pape
Das.Linux at gmx.de
Mon Apr 18 18:33:30 UTC 2011
Am 2011-04-18 um 17:55 schrieb Bert Freudenberg:
>>> […]
>>
>> The terminology can be a bit confusing here if you are thinking
>> only of C pointers. An object reference is a "pointer" to a location
>> in the object memory in the same sense that a (char *) in the C
>> language is a pointer to a location in an array of char.
>>
>>> PS: By this definition, it would be ?easily? possible to
>>> have a VM both execute 64 and 32 bit images, as they are
>>> just other datasets.
>>
>> Absolutely right, although you might not be happy with the resulting
>> performance. Basically you would be dereferencing an "object pointer"
>> at run time to point to the right 32 or 64 bit location. I've thought
>> about trying to do this just for fun, but I'm afraid it would be a
>> lot of work just to make the VM go really slow. But it would be
>> interesting to try it and see how fast you could make it run.
>>
>> Dave
>
> The VM uses macros to convert from oops to addresses and vice versa. These are used throughout nowadays (thanks in large part to Dave).
>
> For the "32 bit VM runs 64 bit image" case, it just ignores the higher 32 bits (thus limiting the image size to 4 GB).
>
> For the "64 bit VM runs 32 bit image" case, there is a 64 bit pointer to the start of the object memory, and oops are added to that.
Thanks to both of you
for the clarification.
So Long,
-Tobias
More information about the Squeak-dev
mailing list
|