aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index ae41da8764..30a2a5f289 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -565,7 +565,8 @@ func (h *mheap) sysAlloc(n uintptr) (v unsafe.Pointer, size uintptr) {
n = alignUp(n, heapArenaBytes)
// First, try the arena pre-reservation.
- v = h.arena.alloc(n, heapArenaBytes, &memstats.heap_sys)
+ // Newly-used mappings are considered released.
+ v = h.arena.alloc(n, heapArenaBytes, &memstats.heapReleased)
if v != nil {
size = n
goto mapped