diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-04-06 20:02:03 -0700 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-04-06 20:02:03 -0700 |
| commit | cfe336770b684ba1a4806772d23e9d178f9b4003 (patch) | |
| tree | 0068b15cc216980acc8b0e08e60d05492796da8e /src/pkg/runtime/malloc.h | |
| parent | 54340bf56fb4b29ea175d85cff4ba765a60961b6 (diff) | |
| download | go-cfe336770b684ba1a4806772d23e9d178f9b4003.tar.xz | |
runtime: replace union in MHeap with a struct
Unions break precise GC.
Update #5193.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/8368044
Diffstat (limited to 'src/pkg/runtime/malloc.h')
| -rw-r--r-- | src/pkg/runtime/malloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h index 38122bf8a5..4635e53e09 100644 --- a/src/pkg/runtime/malloc.h +++ b/src/pkg/runtime/malloc.h @@ -416,10 +416,10 @@ struct MHeap byte *arena_end; // central free lists for small size classes. - // the union makes sure that the MCentrals are + // the padding makes sure that the MCentrals are // spaced CacheLineSize bytes apart, so that each MCentral.Lock // gets its own cache line. - union { + struct { MCentral; byte pad[CacheLineSize]; } central[NumSizeClasses]; |
