]> Cypherpunks repositories - gostls13.git/commit
runtime: refactor mallocgc
authorDmitriy Vyukov <dvyukov@google.com>
Fri, 26 Jul 2013 17:17:24 +0000 (21:17 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Fri, 26 Jul 2013 17:17:24 +0000 (21:17 +0400)
commitf8a850b250655bd26f5da4cfe7299b4a32be28fa
tree8337d4705585d9f8391110098d1d57816ab4d9cf
parenta0f74093b2f3aa0d8d2b69c881a75f40d296355f
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/chan.c
src/pkg/runtime/hashmap.c
src/pkg/runtime/malloc.goc
src/pkg/runtime/malloc.h
src/pkg/runtime/mfinal.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/proc.c
src/pkg/runtime/stack.c
src/pkg/runtime/string.goc