public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Permit GC on any compiler generated allocation
@ 2011-03-07 22:20 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2011-03-07 22:20 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 303 bytes --]

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 *

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-07 22:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-07 22:20 libgo patch committed: Permit GC on any compiler generated allocation Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).