aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mstats.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2018-10-02 21:39:20 +0000
committerMichael Knyszek <mknyszek@google.com>2018-10-30 15:27:51 +0000
commitb46bf0240c0663222f837c78644fe90da932d852 (patch)
treeaea940afd4c2b66dbcb6ba92904d9330ef0ee4cc /src/runtime/mstats.go
parent239341f3b6b5c921c2352ce8267d74948476d8fa (diff)
downloadgo-b46bf0240c0663222f837c78644fe90da932d852.tar.gz
go-b46bf0240c0663222f837c78644fe90da932d852.zip
runtime: separate scavenged spans
This change adds a new treap to mheap which contains scavenged (i.e. its physical pages were returned to the OS) spans. As of this change, spans may no longer be partially scavenged. For #14045. Change-Id: I0d428a255c6d3f710b9214b378f841b997df0993 Reviewed-on: https://go-review.googlesource.com/c/139298 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mstats.go')
-rw-r--r--src/runtime/mstats.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/runtime/mstats.go b/src/runtime/mstats.go
index 1bd6566052..fd576b7ae0 100644
--- a/src/runtime/mstats.go
+++ b/src/runtime/mstats.go
@@ -42,20 +42,6 @@ type mstats struct {
heap_released uint64 // bytes released to the os
heap_objects uint64 // total number of allocated objects
- // TODO(austin): heap_released is both useless and inaccurate
- // in its current form. It's useless because, from the user's
- // and OS's perspectives, there's no difference between a page
- // that has not yet been faulted in and a page that has been
- // released back to the OS. We could fix this by considering
- // newly mapped spans to be "released". It's inaccurate
- // because when we split a large span for allocation, we
- // "unrelease" all pages in the large span and not just the
- // ones we split off for use. This is trickier to fix because
- // we currently don't know which pages of a span we've
- // released. We could fix it by separating "free" and
- // "released" spans, but then we have to allocate from runs of
- // free and released spans.
-
// Statistics about allocation of low-level fixed-size structures.
// Protected by FixAlloc locks.
stacks_inuse uint64 // bytes in manually-managed stack spans