diff options
| author | Diogo Pinela <diogoid7400@gmail.com> | 2018-03-13 23:36:45 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-03-15 09:56:25 +0000 |
| commit | 9ff7df003d770b1dffc984e1861fd009fe08d579 (patch) | |
| tree | ba4160e65355a5fafd03e33ef3ca18f8ea31710d /src/runtime | |
| parent | 672729ebbd15e0b0dfac1ba22e35e92557215e1a (diff) | |
| download | go-9ff7df003d770b1dffc984e1861fd009fe08d579.tar.xz | |
sync: make WaitGroup more space-efficient
The struct stores its 64-bit state field in a 12-byte array to
ensure that it can be 64-bit-aligned. This leaves 4 spare bytes,
which we can reuse to store the sema field.
(32-bit alignment is still guaranteed because the array type was
changed to [3]uint32.)
Fixes #19149.
Change-Id: I9bc20e69e45e0e07fbf496080f3650e8be0d6e8d
Reviewed-on: https://go-review.googlesource.com/100515
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
