But I still believe the idea behind what I'm looking for is perfectly
valid. The internals of a Handle could very well include an memory
ownership bit, which tells the system whether to deallocate or not.
And
then a function like my proposed MemoryToHandle (or more appropriately
WrapMemoryByHandle) would make perfect sense.
The idea could be valid, but it still doesn't match the
implementation, which is really the bottom line here. The Memory
Manager was written (in the early '80s) to allocate blocks in a fixed-
sized heap on a computer with very little memory by today's
standards. Handles were a method of providing an indirect reference
to a block of memory that might need to be moved due to block
resizing, compacting the heap, etc. It doesn't support using memory
outside the heap.
For your situation, it sounds like it would just be easiest to
allocate a handle of the required size and use it as is, vs providing
a static or stack-based block to point to...
steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden