[Vm-dev] how to identify objects ? (hash?)

Mariano Martinez Peck marianopeck at gmail.com
Mon Jul 19 12:25:25 UTC 2010


Hi folks. I have a simple question. Suppose I have a file in disk that has a
"pointer" to an object X that is in the image. What can I store from X in
the file?  Two options: the address in memory or the hash.

If I savethe address, the object X can be moved by the GC, and thus, the
address can become incorrect in the file.  I don't want to update the disk
files in case objects are moved.
If I save the hash of X, how can I then localize that object in memory?
Hash is 12 bits...so it is not enough to find that object...(otherwise there
would be only 4096 objects)

So....the question is, what should I save from object X in the file and what
should I do to be able to localize it, some time after (even when the X is
moved by the GC).

Sorry for my ignorance about the hash.

Thank you very much in advance,

Mariano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100719/d3cf3e6d/attachment.htm


More information about the Vm-dev mailing list