[racket-dev] DrRacket Extension crashes when allocating memory

From: Justin Phillips (jjustinphillipss at gmail.com)
Date: Sat Oct 9 16:11:32 EDT 2010

I'm writing an extension for Mac OS X using the CoreMIDI library. I can send
MIDI data into DrRacket by registering a callback. In my callback I need to
allocate memory with malloc. I have written the code in XCode to verify that
it works. When I compile with 3m for DrRacket it crashes DrRacket when it is
used. Any ideas?? CoreMIDI assigns a high priority thread to handle the
processing. It is definitely the malloc line that breaks. When I remove it,
the extension works. Of course I need the malloc line for the data to be
correct. Any help will be greatly appreciated. Thank you
-Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101009/42b52d16/attachment.html>

Posted on the dev mailing list.