diff options
author | Russ Cox <rsc@golang.org> | 2014-10-03 12:22:19 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-03 12:22:19 -0400 |
commit | c5aca6fedbdd83d9153f6a00dc656aaabb0774c5 (patch) | |
tree | 26952b971b307783cde4b126c0a133f62ac3c893 /src/runtime/malloc.h | |
parent | 4eb6792aa572c7e6d3448d4cf22223b61b65724f (diff) | |
parent | 338c7ea5df93e25ac4dc143970603a1e88b26124 (diff) | |
download | go-c5aca6fedbdd83d9153f6a00dc656aaabb0774c5.tar.gz |
[dev.garbage] merge default into dev.garbage
Diffstat (limited to 'src/runtime/malloc.h')
-rw-r--r-- | src/runtime/malloc.h | 5 |
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); |