j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
From: Jack Newton [mailto:newton@ualberta.ca]
I'm interested in storing a reference to a Smalltalk object in a 32 bit word array. A seemingly convenient way to do this would be to store the object pointer for the object into the array, then later retrieve the object given its object pointer by accessing Squeak's object memory.
Never try to get a direct memory reference to a Squeak object as the GC will move it. And you can't get more than a 12-bit OOP either, so they aren'y unique.
However, all is not lost. Make the word array a Smalltalk object (an Array would do fine), register it as a special object, and use the calls to get element N of the array to find your object wherever it happens to be.
- Peter
squeak-dev@lists.squeakfoundation.org