diff options
| author | Andy Pan <panjf2000@gmail.com> | 2020-11-10 21:02:18 +0800 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2021-02-23 16:02:56 +0000 |
| commit | 55d7dcc3cd4b3ee6bca0ab7101866d785776ff51 (patch) | |
| tree | 6fea51642a39340177a807e87324a3b5e6603c04 /src/runtime/stack.go | |
| parent | ab331c0254d4462dde6640ec9b00fecc828f4162 (diff) | |
| download | go-55d7dcc3cd4b3ee6bca0ab7101866d785776ff51.tar.xz | |
runtime: optimize the memory padding in p struct
Since allocation for p struct will be rounded up to the next size class,
the two relevant adjacent classes for this case are 9728 bytes and 10240 bytes.
A p is currently 10072 bytes, so it gets rounded up to 10240 bytes when we allocate one,
So the pad in p struct is unnecessary, eliminate it and add comments for
warning the false sharing.
Change-Id: Iae8b32931d1beddbfff1f58044d8401703da6407
Reviewed-on: https://go-review.googlesource.com/c/go/+/268759
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions
