[m-users.] Mercury Memory Management

Haitao Zhang zhtprog at gmail.com
Fri Mar 14 13:14:01 AEDT 2014

This is a continuation of the question of using Mercury to write native
libraries or language extensions for another language where GC on the
Mercury side is undesirable.

If I use Mercury purely functionally/declaratively and store all states
through the FFI so that when control returns from Mercury there is no need
to preserve any Mercury data structures, could I disable GC and expect no
memory leak? I read that one can compile with no GC and Mercury heap will
be reclaimed on backtracking. Does that include returning from a
det/semidet predicate?

There was a compile time GC branch with activity as recent as 2008, What
happened to that branch? What about the region based memory management

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20140313/ada364e2/attachment.html>

More information about the users mailing list