[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Foreign Functions, NewPtr, and Heap Question

Hi, all.

I have some foreign function code written in MPW C, and in it I do a
NewPtr and DisposePtr call for temporary allocation of a 32k array.  I
was told by someone that they had heard that NewPtr can step on MCL's
internal heap, or something to that effect.  It seems to me that this
is unlikely, but thought I'd ask the net if anyones heard this one.
The documentation led me to believe that the ff-load created an
"environment" on each call, which conceivably would include a heap, as
well as copies of the libraries the ff was linked with.  It seems that
heaps are heaps, and that MCL should at some level manage them
correctly, with respect to pointers and handles in foreign functions.
If you have references to any info, please provide them with your
comments.  Thanks a billion,

Richard (rholmes@cs.stanford.edu)