From f8a850b250655bd26f5da4cfe7299b4a32be28fa Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Fri, 26 Jul 2013 21:17:24 +0400 Subject: runtime: refactor mallocgc Make it accept type, combine flags. Several reasons for the change: 1. mallocgc and settype must be atomic wrt GC 2. settype is called from only one place now 3. it will help performance (eventually settype functionality must be combined with markallocated) 4. flags are easier to read now (no mallocgc(sz, 0, 1, 0) anymore) R=golang-dev, iant, nightlyone, rsc, dave, khr, bradfitz, r CC=golang-dev https://golang.org/cl/10136043 --- src/pkg/runtime/stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pkg/runtime/stack.c') diff --git a/src/pkg/runtime/stack.c b/src/pkg/runtime/stack.c index 76e2ca62df..dda65f9463 100644 --- a/src/pkg/runtime/stack.c +++ b/src/pkg/runtime/stack.c @@ -105,7 +105,7 @@ runtime·stackalloc(uint32 n) m->stackinuse++; return v; } - return runtime·mallocgc(n, FlagNoProfiling|FlagNoGC, 0, 0); + return runtime·mallocgc(n, 0, FlagNoProfiling|FlagNoGC|FlagNoZero|FlagNoInvokeGC); } void -- cgit v1.3