aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/malloc.h
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-02-15 14:27:03 -0500
committerRuss Cox <rsc@golang.org>2013-02-15 14:27:03 -0500
commit8a6ff3ab3469ea6b448d682ac7ebc3b818208634 (patch)
treebe0d4d94d611d072d7e2c615a6096b820e532dbf /src/pkg/runtime/malloc.h
parentf87b7f67b232db252a527dbc000533a27ccb8cd2 (diff)
downloadgo-8a6ff3ab3469ea6b448d682ac7ebc3b818208634.tar.xz
runtime: allocate heap metadata at run time
Before, the mheap structure was in the bss, but it's quite large (today, 256 MB, much of which is never actually paged in), and it makes Go binaries run afoul of exec-time bss size limits on some BSD systems. Fixes #4447. R=golang-dev, dave, minux.ma, remyoudompheng, iant CC=golang-dev https://golang.org/cl/7307122
Diffstat (limited to 'src/pkg/runtime/malloc.h')
-rw-r--r--src/pkg/runtime/malloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/malloc.h b/src/pkg/runtime/malloc.h
index 5c65f62a24..5874741e17 100644
--- a/src/pkg/runtime/malloc.h
+++ b/src/pkg/runtime/malloc.h
@@ -427,7 +427,7 @@ struct MHeap
FixAlloc spanalloc; // allocator for Span*
FixAlloc cachealloc; // allocator for MCache*
};
-extern MHeap runtime·mheap;
+extern MHeap *runtime·mheap;
void runtime·MHeap_Init(MHeap *h, void *(*allocator)(uintptr));
MSpan* runtime·MHeap_Alloc(MHeap *h, uintptr npage, int32 sizeclass, int32 acct, int32 zeroed);