aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/malloc.h
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-10 21:23:08 -0800
committerRuss Cox <rsc@golang.org>2010-02-10 21:23:08 -0800
commit22a7f2a14d8fd870913942707dd3f30a30bb1eeb (patch)
tree3ff6573c09dd6d13814515ecae0ac692fc7cc758 /src/pkg/runtime/malloc.h
parentfc8e3d4004a1d583d329aa5055407c83e52bd581 (diff)
downloadgo-22a7f2a14d8fd870913942707dd3f30a30bb1eeb.tar.xz
runtime: delete MHeapMapCache, which is useless
because free needs to mark the block as freed to coordinate with the garbage collector. (in C++ free can blindly put the block on the free list, no questions asked, so the cache saves some work.) R=iant CC=golang-dev https://golang.org/cl/206069
Diffstat (limited to 'src/pkg/runtime/malloc.h')
-rw-r--r--src/pkg/runtime/malloc.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h
index f018b6e216..b9dea2f5e9 100644
--- a/src/pkg/runtime/malloc.h
+++ b/src/pkg/runtime/malloc.h
@@ -20,8 +20,6 @@
// MHeap: the malloc heap, managed at page (4096-byte) granularity.
// MSpan: a run of pages managed by the MHeap.
// MHeapMap: a mapping from page IDs to MSpans.
-// MHeapMapCache: a small cache of MHeapMap mapping page IDs
-// to size classes for pages used for small objects.
// MCentral: a shared free list for a given size class.
// MCache: a per-thread (in Go, per-M) cache for small objects.
// MStats: allocation statistics.
@@ -87,7 +85,6 @@ typedef struct FixAlloc FixAlloc;
typedef struct MCentral MCentral;
typedef struct MHeap MHeap;
typedef struct MHeapMap MHeapMap;
-typedef struct MHeapMapCache MHeapMapCache;
typedef struct MSpan MSpan;
typedef struct MStats MStats;
typedef struct MLink MLink;
@@ -296,7 +293,6 @@ struct MHeap
// span lookup
MHeapMap map;
- MHeapMapCache mapcache;
// range of addresses we might see in the heap
byte *min;
@@ -324,7 +320,7 @@ MSpan* MHeap_LookupMaybe(MHeap *h, PageID p);
void MGetSizeClassInfo(int32 sizeclass, int32 *size, int32 *npages, int32 *nobj);
void* mallocgc(uintptr size, uint32 flag, int32 dogc, int32 zeroed);
-int32 mlookup(void *v, byte **base, uintptr *size, uint32 **ref);
+int32 mlookup(void *v, byte **base, uintptr *size, MSpan **s, uint32 **ref);
void gc(int32 force);
void* SysAlloc(uintptr);