Commit 01a7d39d authored by Keith Randall's avatar Keith Randall

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
parent a91c1f5c
......@@ -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<<PageShift;
MHeap_FreeSpanLocked(h, s);
runtime·unlock(h);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment