From: Dmitriy Vyukov Date: Mon, 18 Jul 2011 18:56:22 +0000 (-0400) Subject: runtime: add per-M caches for MemStats X-Git-Tag: weekly.2011-07-19~20 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=27753ff10897b566b6b8086f5fa3c83b6c4c271e;p=gostls13.git runtime: add per-M caches for MemStats Avoid touching centralized state during memory manager operations. R=mirtchovski CC=golang-dev, rsc https://golang.org/cl/4766042 --- diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h index 2865317ef6..5bc80f4df9 100644 --- a/src/pkg/runtime/malloc.h +++ b/src/pkg/runtime/malloc.h @@ -268,7 +268,7 @@ struct MCache uint64 size; int64 local_cachealloc; // bytes allocated (or freed) from cache since last lock of heap int64 local_objects; // objects allocated (or freed) from cache since last lock of heap - int64 local_alloc; // bytes allocated and still in use since last lock of heap + int64 local_alloc; // bytes allocated (or freed) since last lock of heap int64 local_total_alloc; // bytes allocated (even if freed) since last lock of heap int64 local_nmalloc; // number of mallocs since last lock of heap int64 local_nfree; // number of frees since last lock of heap