This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgo patch committed: Permit GC on any compiler generated allocation


Due to an oversight, libgo did not permit garbage collection to occur
on any compiler generated memory allocation.  It would only occur on
memory allocation in the runtime library, or when allocating memory
which was known to not hold pointers.  This libgo patch fixes that
oversight.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

diff -r 22c4b0a38087 libgo/runtime/go-new.c
--- a/libgo/runtime/go-new.c	Mon Mar 07 13:55:47 2011 -0800
+++ b/libgo/runtime/go-new.c	Mon Mar 07 14:17:10 2011 -0800
@@ -11,7 +11,7 @@
 void *
 __go_new (size_t size)
 {
-  return __go_alloc (size);
+  return runtime_mallocgc (size, 0, 1, 1);
 }
 
 void *

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]