From 01a7d39df1d6ba5e3ba8a5b8e928b906556c6772 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Sat, 19 Jul 2014 10:29:57 -0700 Subject: [PATCH] runtime: fix stacks_sys accounting subtract freed count before span gets merged during free. LGTM=dvyukov R=dmitry, dvyukov CC=golang-codereviews https://golang.org/cl/112450045 --- src/pkg/runtime/mheap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/runtime/mheap.c b/src/pkg/runtime/mheap.c index c03287fd4b..202a903ff8 100644 --- a/src/pkg/runtime/mheap.c +++ b/src/pkg/runtime/mheap.c @@ -507,8 +507,8 @@ runtime·MHeap_FreeStack(MHeap *h, MSpan *s) runtime·throw("mheap_freestack not on M stack"); s->needzero = 1; runtime·lock(h); - MHeap_FreeSpanLocked(h, s); mstats.stacks_inuse -= s->npages<