summaryrefslogtreecommitdiff
path: root/src/runtime/malloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/malloc.h')
-rw-r--r--src/runtime/malloc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/malloc.h b/src/runtime/malloc.h
index 413870c9f..520c783df 100644
--- a/src/runtime/malloc.h
+++ b/src/runtime/malloc.h
@@ -279,6 +279,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
@@ -332,6 +334,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
@@ -527,8 +530,6 @@ uintptr runtime·sweepone(void);
void runtime·markspan(void *v, uintptr size, uintptr n, bool leftover);
void runtime·unmarkspan(void *v, uintptr size);
void runtime·purgecachedstats(MCache*);
-void* runtime·cnew(Type*);
-void* runtime·cnewarray(Type*, intgo);
void runtime·tracealloc(void*, uintptr, Type*);
void runtime·tracefree(void*, uintptr);
void runtime·tracegc(void);