Index: src/pkg/runtime/malloc.h |
=================================================================== |
--- a/src/pkg/runtime/malloc.h |
+++ b/src/pkg/runtime/malloc.h |
@@ -306,7 +306,6 @@ |
{ |
MSpan *next; // in a span linked list |
MSpan *prev; // in a span linked list |
- MSpan *allnext; // in the list of all spans |
PageID start; // starting page number |
uintptr npages; // number of pages in span |
MLink *freelist; // list of free objects |
@@ -342,6 +341,7 @@ |
void runtime·MCentral_Init(MCentral *c, int32 sizeclass); |
int32 runtime·MCentral_AllocList(MCentral *c, int32 n, MLink **first); |
void runtime·MCentral_FreeList(MCentral *c, int32 n, MLink *first); |
+void runtime·MCentral_FreeSpan(MCentral *c, MSpan *s, int32 n, MLink *start, MLink *end); |
// Main malloc heap. |
// The heap itself is the "free[]" and "large" arrays, |
@@ -351,7 +351,9 @@ |
Lock; |
MSpan free[MaxMHeapList]; // free lists of given length |
MSpan large; // free lists length >= MaxMHeapList |
- MSpan *allspans; |
+ MSpan **allspans; |
+ uintptr nspan; |
+ uintptr nspancap; |
// span lookup |
MSpan *map[1<<MHeapMap_Bits]; |
@@ -412,7 +414,11 @@ |
void runtime·MProf_Malloc(void*, uintptr); |
void runtime·MProf_Free(void*, uintptr); |
void runtime·MProf_GC(void); |
-int32 runtime·helpgc(bool*); |
+ |
+void runtime·stoptheworld(void); |
+void runtime·starttheworld(void); |
+int32 runtime·gcprocs(void); |
+void runtime·helpgc(int32 nproc); |
void runtime·gchelper(void); |
bool runtime·getfinalizer(void *p, bool del, void (**fn)(void*), int32 *nret); |