From: stefan Date: Sat, 13 Dec 2003 18:52:21 +0000 (+0000) Subject: Added GCFREE X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=4e4bb1f75a1ade68ccc44ab43db400b4b59a3329;p=cacao.git Added GCFREE --- diff --git a/src/mm/memory.h b/src/mm/memory.h index a57dcb598..bfa9bc79f 100644 --- a/src/mm/memory.h +++ b/src/mm/memory.h @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: memory.h 662 2003-11-21 18:06:25Z jowenn $ + $Id: memory.h 739 2003-12-13 18:52:21Z stefan $ */ @@ -89,7 +89,9 @@ Some more macros: /* Uncollectable memory which can contain references */ void *heap_alloc_uncollectable(u4 bytelen); +void heap_free(void *); #define GCNEW(type,num) heap_alloc_uncollectable(sizeof(type) * (num)) +#define GCFREE(ptr) heap_free(ptr) #define ALIGN(pos,size) ((((pos) + (size) - 1) / (size)) * (size)) #define PADDING(pos,size) (ALIGN((pos),(size)) - (pos)) diff --git a/toolbox/memory.h b/toolbox/memory.h index a57dcb598..bfa9bc79f 100644 --- a/toolbox/memory.h +++ b/toolbox/memory.h @@ -26,7 +26,7 @@ Authors: Reinhard Grafl - $Id: memory.h 662 2003-11-21 18:06:25Z jowenn $ + $Id: memory.h 739 2003-12-13 18:52:21Z stefan $ */ @@ -89,7 +89,9 @@ Some more macros: /* Uncollectable memory which can contain references */ void *heap_alloc_uncollectable(u4 bytelen); +void heap_free(void *); #define GCNEW(type,num) heap_alloc_uncollectable(sizeof(type) * (num)) +#define GCFREE(ptr) heap_free(ptr) #define ALIGN(pos,size) ((((pos) + (size) - 1) / (size)) * (size)) #define PADDING(pos,size) (ALIGN((pos),(size)) - (pos))