[svn:parrot] r43332 - branches/boehm_gc/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Dec 31 06:54:01 UTC 2009
Author: bacek
Date: Thu Dec 31 06:54:00 2009
New Revision: 43332
URL: https://trac.parrot.org/parrot/changeset/43332
Log:
"calloc" zeroing allocated memory. GC_MALLOC_UNCOLLECTABLE doesn't. So do it manually.
Modified:
branches/boehm_gc/src/gc/alloc_memory.c
Modified: branches/boehm_gc/src/gc/alloc_memory.c
==============================================================================
--- branches/boehm_gc/src/gc/alloc_memory.c Thu Dec 31 06:53:39 2009 (r43331)
+++ branches/boehm_gc/src/gc/alloc_memory.c Thu Dec 31 06:54:00 2009 (r43332)
@@ -29,7 +29,7 @@
# define malloc GC_MALLOC_UNCOLLECTABLE
# define free GC_FREE
# define realloc GC_REALLOC
-# define calloc(s, n) GC_MALLOC_UNCOLLECTABLE((s)*(n))
+# define calloc(s,n) memset(GC_MALLOC_UNCOLLECTABLE(s*n), 0, s*n)
#endif
PARROT_DOES_NOT_RETURN
More information about the parrot-commits
mailing list