aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2023-11-17 16:45:45 +0000
committerMichael Knyszek <mknyszek@google.com>2023-11-17 23:15:20 +0000
commitf67b2d8f0bcadb59461b7a33bc1c23649ce8eb85 (patch)
tree3b01b755b98676c2c1c5133aefd092d92ac0cefa /api
parent0b31a46f1fd89b1ede02be9fae920dca6172ffaf (diff)
downloadgo-f67b2d8f0bcadb59461b7a33bc1c23649ce8eb85.tar.gz
go-f67b2d8f0bcadb59461b7a33bc1c23649ce8eb85.zip
runtime: use span.elemsize for accounting in mallocgc
Currently the final size computed for an object in mallocgc excludes the allocation header. This is correct in a number of cases, but definitely wrong for memory profiling because the "free" side accounts for the full allocation slot. This change makes an explicit distinction between the parts of mallocgc that care about the full allocation slot size ("the GC's accounting") and those that don't (pointer+len should always be valid). It then applies the appropriate size to the different forms of accounting in mallocgc. For #64153. Change-Id: I481b34b2bb9ff923b59e8408ab2b8fb9025ba944 Reviewed-on: https://go-review.googlesource.com/c/go/+/542735 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions