]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: remove useless heap_objects accounting
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 18 Sep 2019 14:11:28 +0000 (14:11 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Nov 2019 16:20:27 +0000 (16:20 +0000)
commit814c5058bbbd70e706b0305d823e83aa0112d5a4
treec4546ed192ac02226f402c57bec13e2d2556d810
parent4208dbef161c554b30607f48c347a6c97add80b3
runtime: remove useless heap_objects accounting

This change removes useless additional heap_objects accounting for large
objects. heap_objects is computed from scratch at ReadMemStats time
(which stops the world) by using nlargealloc and nlargefree, so mutating
heap_objects turns out to be pointless.

As a result, the "large" parameter on "mheap_.freeSpan" is no longer
necessary and so this change cleans that up too.

Change-Id: I7d6b486d9b57c018e3db46221d81b55fe4c1b021
Reviewed-on: https://go-review.googlesource.com/c/go/+/196637
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mcentral.go
src/runtime/mgcsweep.go
src/runtime/mheap.go
src/runtime/mstats.go