Squeak (file system & project structure) newbie questions
tim Rowledge
tim at rowledge.org
Mon Oct 24 01:24:55 UTC 2005
On 23-Oct-05, at 5:01 PM, untz wrote:
>
> What is an image, by the way? Is it the actual virtual machine or
> is it synonymous
> with Java .class files that get loaded by a ClassLoader, in a JVM?
An image (or sometimes you'll see us call them snapshots) is a memory
dump of all the live objects you have. A small header contains a few
important bootstrap values but apart from that it's just bits written
out of your RAM. when we load an image we use those bootstrap values
to work out what if any pointer correcting is need to make all the
loaded objects work in what might be a different machine on a
different OS, whether some byte-endian correction is needed
and .. .well that's about it. Then the stack frame (or Context as we
call them) that was last active - the one that called the code to
save the snapshot - is reactivated and the life of the objects just
continues as if nothing happened.
No class loader - whatever that is - no .class files, no portability
issues, no compiling, no fuss. If I save an image on my ARM powered
RISC OS machine (little-endian, memory addresses done in a weird way)
and email it to you to load on your OSX machine (big endian, memory
handled in a really weird way) there is no messing around for you to
worry about. Just run it. Oh, actually you might just possibly need
to set the filetype if email screws it up.
I've never understood why you would do it any other way.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
More information about the Squeak-dev
mailing list
|