parent
75f49ac9cb
commit
a30700ff0d
@ -0,0 +1,17 @@ |
||||
#include <stdlib.h> |
||||
#include <stdio.h> |
||||
|
||||
#include <gc.h> |
||||
#include <gmp.h> |
||||
|
||||
void gmp_free(void* p, size_t s) { |
||||
GC_FREE(p); // TODO: see if this performs better than a NOP
|
||||
} |
||||
|
||||
void* gmp_realloc(void* p, size_t o, size_t n) { |
||||
return GC_REALLOC(p, n); |
||||
} |
||||
|
||||
void gmp_init(void) { |
||||
mp_set_memory_functions(GC_malloc, gmp_realloc, gmp_free); |
||||
} |
@ -0,0 +1,6 @@ |
||||
#ifndef _GMP_SETUP_H |
||||
#define _GMP_SETUP_H |
||||
|
||||
void gmp_init(void); |
||||
|
||||
#endif |
Loading…
Reference in new issue