Thanks to everyone for helping with the shared library idea. I still can't compile a shared library using the GCC tools, but when I figure that out I'll know what my options are. ;-) My big problem now is movable memory. I am writing a veneer layer to be used by cross-platform by third-party developers; they will write generic code to this interface. This veneer implements such things as Java-style Vectors and StringBuffers -- dynamically allocated and resizable objects. It is obviously highly desirable that they be movable to keep memory from fragmenting all to hell. But here's the issue: Client module A asks me for the item at index i out of Vector v. I duly lock the MemHandle for v, go get the address of the item, unlock the MemHandle, and hand the caller back the pointer. BUT, the moment I unlocked the MemHandle, I removed the guarantee that the pointer is valid. If the caller calls a function that just happens to allocate some memory on the heap, the memory for Vector v could be moved, and when the caller subsequently uses the pointer I gave her it will no longer point to the right data. How does anyone write any sharable code with accessor functions on the Palm? None of the options that come to mind are palatable: 1) Use non-movable memory chunks for highly dynamic objects. 2) Make the caller do her own locking/unlocking. While macros or defines could optimize this out for every platform but the Palm, the ugliness and programmer pain would be extremely high. 3) Make local copies of everything, and give back pointers to the local copies. Now the caller again has to do something odd (free the local copy when done), and performance goes down to abysmal levels. Thanks for any advice for a relative Palm newbie, Curtis Jackson Director of Engineering Aniwhere, Inc. [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
