]> Cypherpunks repositories - gostls13.git/commit
runtime: always pass type to mallocgc when allocating scannable memory
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 19 Aug 2014 11:59:42 +0000 (15:59 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 19 Aug 2014 11:59:42 +0000 (15:59 +0400)
commitfb44fb6cb7fdadced51db03403b9f5d93fefa5a5
treedba74784865dd0d6a7544a67f5832a022e4c1d5e
parent9198ed4bd6ec7b7dd37aa2797e96f15ddbb1e6cd
runtime: always pass type to mallocgc when allocating scannable memory
We allocate scannable memory w/o type only in few places in runtime.
All these cases are not-performance critical (e.g. G or finq args buffer),
and in long term they all need to go away.
It's not worth it to have special code for this case in mallocgc.
So use special fake "notype" type for such allocations.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rlh, rsc
https://golang.org/cl/127450044
src/pkg/runtime/malloc.c
src/pkg/runtime/malloc.go
src/pkg/runtime/mgc0.go