C interface

Tomas By T.By at dcs.shef.ac.uk
Fri Oct 3 22:18:18 AEST 1997


Hi all,

In the manual (Language Reference 10.1.8) it says that "when
using conservative garbage collection, heap storage is reclaimed
automatically". Does this mean I can malloc in the C code, pass
it back to Mercury, and it will eventually be garbage collected,
i.e. I don't have to free it?

If not, then how do I allocated memory in the C code?

Also, would it not be a good idea to have a pragma that says
"this code _must_ be compiled with GC"?

/Tomas




More information about the users mailing list