mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-04 14:20:26 +02:00
Add a simple memory management wrapper.
* lib/jit_memory.c: Implement a simple memory allocation wrapper to allow overriding calls to malloc/calloc/realloc/free, as well as ensuring all memory containing pointers is zero or points to allocated memory. * include/lightning.h, include/lightning/jit_private.h: Definitions for the memory allocation wrapper. * lib/Makefile.am: Update for new jit_memory.c file. * lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc.c, lib/jit_sparc.c, lib/jit_x86.c, lib/lightning.c: Use the new memory allocation wrapper code.
This commit is contained in:
parent
be9068f2ee
commit
c39def9dce
13 changed files with 263 additions and 148 deletions
|
@ -481,6 +481,10 @@ extern jit_bool_t _jit_get_note(jit_state_t*,jit_uint8_t*,char**,char**,int*);
|
|||
#define jit_annotate() _jit_annotate(_jit)
|
||||
extern void _jit_annotate(jit_state_t*);
|
||||
|
||||
extern void jit_alloc(jit_pointer_t*, jit_word_t);
|
||||
extern void jit_realloc(jit_pointer_t*, jit_word_t, jit_word_t);
|
||||
void jit_free(jit_pointer_t*);
|
||||
|
||||
/*
|
||||
* Externs
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue