aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-04-13 17:06:22 -0400
committerAustin Clements <austin@google.com>2015-04-21 15:35:41 +0000
commit91c80ce6c75b5b11dc3f888d4a1f34c7133f2341 (patch)
tree8fcec741240d73218c44be4218f024770a89493d /src/runtime/malloc.go
parenta0452a68211c505596d0a406ec083cf5d3b03b89 (diff)
downloadgo-91c80ce6c75b5b11dc3f888d4a1f34c7133f2341.tar.xz
runtime: make mcache.local_cachealloc a uintptr
This field used to decrease with sweeps (and potentially go negative). Now it is always zero or positive, so change it to a uintptr so it meshes better with other memory stats. Change-Id: I6a50a956ddc6077eeaf92011c51743cb69540a3c Reviewed-on: https://go-review.googlesource.com/8899 Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index 84a2ad71a4..4a2d3e3cac 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -623,7 +623,7 @@ func mallocgc(size uintptr, typ *_type, flags uint32) unsafe.Pointer {
}
}
}
- c.local_cachealloc += intptr(size)
+ c.local_cachealloc += size
} else {
var s *mspan
shouldhelpgc = true