2010/9/1 James Ladd <james_l...@hotmail.com>

>
> Hi All,
>
> I'm looking for information on the image file format, something that tells
> me the layout.
> A little like this:
>
> +--------+
> ! version !
> +--------+
> ! count   !
> +--------+
>
> etc. I can glean this information from the Squeak C sources but I'm wanting
> some
> additional information for validation. Maybe it is in the blue book but I
> have also read
> that Squeak varies on this a little.
>
> Also - what is a Compact Class Array section of the image file?
>

Each object (all but SmallInteger in Squeak i think) has its own Object
Header. Each object has to know its class. Now...image those classes where
you have a lot of instances, like Bitmap, ByteString, etc...(print
Smalltalk compactClassesArray for more examples)  If for each instance of
them you need 32bits (4 bytes) to point to their class, you will use "a lot"
of memory.

So, someone introduced something in the VM where they modified the Object
Header so that you can use 5 bits for an index in a table of compact
classes. So you have 32 classes that you can define as compact (see
#becomeCompact), and this means that its instances will have an object
header small (without a real pointer to its class). Thus....saves memory.

However, the system has to ask if it is compact or not several places in the
vm, having an overhead I imagine.

IMHO, they could be removed since it is not THAT MUCH in today's computers.
And the VM would be cleaner.



cheers

mariano



>
> Rgs, James.
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to