Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(57)

Unified Diff: src/pkg/runtime/malloc.h

Issue 5279048: code review 5279048: runtime: faster and more scalable GC (Closed)
Patch Set: diff -r f44057cc01b2 https://go.googlecode.com/hg/ Created 12 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/export_test.go ('k') | src/pkg/runtime/mcache.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/pkg/runtime/export_test.go ('k') | src/pkg/runtime/mcache.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b