aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/malloc.h')
-rw-r--r--src/runtime/malloc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/malloc.h b/src/runtime/malloc.h
index 3f1981f708..410a007173 100644
--- a/src/runtime/malloc.h
+++ b/src/runtime/malloc.h
@@ -278,6 +278,8 @@ struct MStats
uint64 nmalloc;
uint64 nfree;
} by_size[NumSizeClasses];
+
+ uint64 tinyallocs; // number of tiny allocations that didn't cause actual allocation; not exported to Go directly
};
#define mstats runtime·memstats
@@ -331,6 +333,7 @@ struct MCache
// See "Tiny allocator" comment in malloc.goc.
byte* tiny;
uintptr tinysize;
+ uintptr local_tinyallocs; // number of tiny allocs not counted in other stats
// The rest is not accessed on every malloc.
MSpan* alloc[NumSizeClasses]; // spans to allocate from