[svn:parrot] r43897 - branches/boehm_gc_2/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Feb 11 13:14:57 UTC 2010


Author: bacek
Date: Thu Feb 11 13:14:57 2010
New Revision: 43897
URL: https://trac.parrot.org/parrot/changeset/43897

Log:
Copy alloc_memory.c from old branch

Modified:
   branches/boehm_gc_2/src/gc/alloc_memory.c

Modified: branches/boehm_gc_2/src/gc/alloc_memory.c
==============================================================================
--- branches/boehm_gc_2/src/gc/alloc_memory.c	Thu Feb 11 13:14:44 2010	(r43896)
+++ branches/boehm_gc_2/src/gc/alloc_memory.c	Thu Feb 11 13:14:57 2010	(r43897)
@@ -24,6 +24,14 @@
 #include "parrot/parrot.h"
 #include "parrot/memory.h"
 
+#ifdef PARROT_HAS_BOEHM_GC
+#  include <gc.h>
+#  define malloc GC_MALLOC
+#  define free(x) {}
+#  define realloc GC_REALLOC
+#  define calloc(s, n) GC_MALLOC((s)*(n))
+#endif
+
 PARROT_DOES_NOT_RETURN
 static void failed_allocation(unsigned int line, unsigned long size) /* HEADERIZER SKIP */
 {


More information about the parrot-commits mailing list