[racket] FFI/3m and Boehm GC compatibility

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jul 16 12:12:19 EDT 2012

At Mon, 16 Jul 2012 15:48:42 +0100, Tim Brown wrote:
> Folks,
> I posted this on IRC earlier today with no response:
>    "With ffi, i have a function which returns a pointer which has been
>     malloc'd using a GC_malloc (linked with my foreign library).
>    "I need this pointer to remain visible within racket (i.e. on the stack
>     or anywhere else that the CGC would find it). This is fine for
>     racketcgc (since GC_malloc is shared between my library and racket)
>     but how do i keep a pointer visible with racket3m?
>    "[if possible, without "remembering" it explicitly in my library]"
> Does anyone have any idea how to hint to the FFI that I want this reference
> kept visible?

If I understand the question:

When you have a pointer to memory managed by the Racket GC, use the C
type `_gcpointer' or `_gcable' applied to some other pointer value.

Posted on the users mailing list.