cvsuser 02/02/14 08:53:02
Modified: . memory.c
Log:
intercept free and realloc
Revision Changes Path
1.19 +17 -1 parrot/memory.c
Index: memory.c
===================================================================
RCS file: /home/perlcvs/parrot/memory.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -w -r1.18 -r1.19
--- memory.c 11 Jan 2002 19:33:38 -0000 1.18
+++ memory.c 14 Feb 2002 16:53:02 -0000 1.19
@@ -1,7 +1,7 @@
/* memory.c
* Copyright: (When this is determined...it will go here)
* CVS Info
- * $Id: memory.c,v 1.18 2002/01/11 19:33:38 dan Exp $
+ * $Id: memory.c,v 1.19 2002/02/14 16:53:02 dan Exp $
* Overview:
* The memory (mem) API handles memory allocation
* Data Structure and Algorithms:
@@ -70,6 +70,22 @@
void *
mem_sys_allocate(UINTVAL size) {
return malloc((size_t)size);
+}
+
+/*=for api mem mem_sys_realloc
+ resize a chunk of system memory
+*/
+void *
+mem_sys_realloc(void *from, UINTVAL size) {
+ return realloc(from, size);
+}
+
+/*=for api mem mem_sys_free
+ free a chunk of memory back to the system
+*/
+void
+mem_sys_free(void *from) {
+ free(from);
}
/*=for api mem mem_setup_allocator