diff options
| author | Shenghou Ma <minux.ma@gmail.com> | 2012-10-23 02:33:51 +0800 |
|---|---|---|
| committer | Shenghou Ma <minux.ma@gmail.com> | 2012-10-23 02:33:51 +0800 |
| commit | 7c44edf4250d8e1ad0ed37bf4ae27ec7f6c07ab6 (patch) | |
| tree | 64b5ea70362a78144d336498913446ff63d0e99b /src/pkg/runtime/malloc.goc | |
| parent | 7c03cd32b6612f153cf6362ead27e86af6e65336 (diff) | |
| download | go-7c44edf4250d8e1ad0ed37bf4ae27ec7f6c07ab6.tar.xz | |
runtime, runtime/race: add missing if(raceenabled), update package docs of pkg race
R=dvyukov
CC=golang-dev
https://golang.org/cl/6733058
Diffstat (limited to 'src/pkg/runtime/malloc.goc')
| -rw-r--r-- | src/pkg/runtime/malloc.goc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/runtime/malloc.goc b/src/pkg/runtime/malloc.goc index eaae52a641..f8aa1c949e 100644 --- a/src/pkg/runtime/malloc.goc +++ b/src/pkg/runtime/malloc.goc @@ -715,7 +715,8 @@ runtime·cnew(Type *typ) uint32 flag; void *ret; - m->racepc = runtime·getcallerpc(&typ); + if(raceenabled) + m->racepc = runtime·getcallerpc(&typ); flag = typ->kind&KindNoPointers ? FlagNoPointers : 0; ret = runtime·mallocgc(typ->size, flag, 1, 1); |
