[plt-scheme] Using a DLL with a extension (mzgtk2)

From: Ryan Culpepper (ryan_sml at yahoo.com)
Date: Wed Jan 11 12:00:26 EST 2006

--- Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
> [...]
> I've moved a small part of the code (notably the type mappings
> and the administrative code for memory management) to a
> shared library.
> On windows I'm getting into trouble. After moving this
> administrative code to a DLL, the binding crashes on the first
> request for memory management.
> I think I somehow need to initialize the DLL for usage with the
> mzscheme garbage collector, but how should I do that?
> Could somebody point me out how?

I don't know if this is what you mean, but have you tried the GLib
call to set up the memory allocation "vtable"? It should let you
force all GLib-related functions to use mzscheme's memory allocation

Look at GMemVTable and g_mem_set_vtable() in:


Hope that helps,

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.