GMP and static memory allocation

Benedetto bennygirge at gmail.com
Fri Dec 21 15:43:45 UTC 2018


Hi everyone,

I am developing some benchmarks for a constrained device (Zolertia 
Re-Mote) which use the GMP library. And due to the fact GMP uses 
malloc()'s to allocate memory i came across this problem: 
https://stackoverflow.com/questions/53885652/contiki-enlarge-heap-size-for-zoul?noredirect=1#comment94620097_53885652.

Basically the size of the heap on this device is not sufficient to use 
GMP and, as you can read in the stackoverflow post, the OS i am using 
(contiki) discourages the use of dynamic memory. My question is: Is 
there an easy way i can compile GMP to use static memory instead?

I have read the info section about "Temporary Memory" but from there it 
seems there is no way to do it.

Thank you in advance,

Benedetto Girgenti



More information about the gmp-discuss mailing list