[m-users.] Too Slow

Matthias Guedemann matthias.guedemann at googlemail.com
Fri May 1 16:02:48 AEST 2015


Hi Peter,

> You should allocate the mp_ints like this:

>     Mp_Int = MR_GC_NEW_ATTRIB(mp_int, MR_ALLOC_ID);

> For the string in mp_to_string you should use

>     MR_allocate_aligned_string_msg(S, length, MR_ALLOC_ID);

> or other macros in mercury_string.h

ok, thank you for the hints. Could you point me to the relevant section
in the user guide, or is the documentation only in the source files?

> You should add the attribute `thread_safe' to all of the foreign
> procs.

Thanks a lot for your help,

Matthias



More information about the users mailing list