aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>2013-01-30 09:01:31 -0800
committerRuss Cox <rsc@golang.org>2013-01-30 09:01:31 -0800
commit4da6b36fbf2af314f62bc51576c7785a5631c016 (patch)
treeca22da49f1992d1e50882d7fcb92b94675436084 /src/pkg/runtime/proc.c
parent3bdeaf2a64a9731fc664b6d0fc36a70e7a7e0a05 (diff)
downloadgo-4da6b36fbf2af314f62bc51576c7785a5631c016.tar.xz
runtime: local allocation in mprof.goc
Binary data in mprof.goc may prevent the garbage collector from freeing memory blocks. This patch replaces all calls to runtime·mallocgc() with calls to an allocator private to mprof.goc, thus making the private memory invisible to the garbage collector. The addrhash variable is moved outside of the .bss section. R=golang-dev, dvyukov, rsc, minux.ma CC=dave, golang-dev, remyoudompheng https://golang.org/cl/7135063
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 9b143b92f3..b589235c1f 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -190,6 +190,7 @@ runtime·schedinit(void)
byte *p;
m->nomemprof++;
+ runtime·mprofinit();
runtime·mallocinit();
mcommoninit(m);