[mercury-users] Making a Mercury shared library
Guillaume Yziquel
guillaume.yziquel at citycable.ch
Sat Jun 4 23:24:53 AEST 2011
Le Friday 03 Jun 2011 à 13:58:10 (+1000), Julien Fischer a écrit :
>
> >What should I do to properly initialise the engine from foreign code?
>
> See the ``Stand-alone Interfaces'' section of the User's guide for
> details of how to do this. There is an example in
> samples/c_interface/standalone_c.
>
> Julien.
Thank you so much. Just a small question as I have a heap compacting GC
that moves values around... argv is a char **.
Should the array remain at a specific location in memory after the call
to mercury_init() finishes? Or may OCaml's GC freely move this array
around in the OCaml heap?
And this is perhaps a more general question, but how careful should I be
when sharing values between OCaml and Mercury given the fact that
OCaml's GC may move values around in the heap?
Best regards,
--
Guillaume Yziquel
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list