fixed address objects (was Calling straight C code)

Tim Rowledge rowledge at interval.com
Tue Mar 9 23:56:53 UTC 1999


On Tue 09 Mar, agree at carltonfields.com wrote:
> You may wish to consider the propriety of using a Squeak object to represent
External [Snip good stuff]
Although a handle to a 'normal' ByteArray can sometimes be useful, it's that
lack of cross-reference knowledge that is a problem. The stuff I've written
avoids this by creating real, genuine, pukka objects outside the main squeak
object space. The gc scans them just like any other object ('cept when the
address problem I'm having with windows happens) and so any that refer to other
external objects work as expected.
The advantage of this is for things like bitmaps that want to be located in
some special place (on the Acorn, the Display bitmap has to be within a very
special address area; on Windows it could be advantagous to have some bitmaps
in the graphics card memory and so on) you need no wierd special casing in some
important prims. It also eases interacing with C code that has no provision for
indirection.
> Consider the POSIX regular expression interface.
> [Snip more]
Sounds reasonable - if an interestingly complicated situation!
My immediate need is for a simple WordArray that won't move - since I'm filling
it with executable code that might get called anytime.  What I have is fine for
this on my platform, but since it's not yet portable it would be quite wrong to
release it for general use.

tim

-- 
"Like no bother man.." said Pooh as he spaced out on hash
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list