Memory managment of set_str functions
noreply at z505.com
noreply at z505.com
Tue Mar 31 22:09:54 UTC 2020
If a pointer to char is allocated in some of the functions where the
huge number is a string, how should memory be managed and on the DLL
side or the program side using the DLL?
i.e.
getmem()
freemem()
.. to allocate memory for the *char
The help documentation in GMP should mention a note that the *char
should be allocated on your program side or it's allocated on the GMP
DLL side, and when do I free it? Do I obtain the length using some
function first for memory allocation on my program side?
Thanks,
Lars
More information about the gmp-discuss
mailing list