From d2574e2adb658b46ea2d8e22b3195cc14da1affe Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 16 Sep 2014 10:22:15 -0400 Subject: runtime: remove duplicated Go constants The C header files are the single point of truth: every C enum constant Foo is available to Go as _Foo. Remove or redirect duplicate Go declarations so they cannot be out of sync. Eventually we will need to put constants in Go, but for now having them be out of sync with C is too risky. These predate the build support for auto-generating Go constants from the C definitions. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/141510043 --- src/runtime/malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime/malloc.c') diff --git a/src/runtime/malloc.c b/src/runtime/malloc.c index b56f42531e..e5c7e09592 100644 --- a/src/runtime/malloc.c +++ b/src/runtime/malloc.c @@ -102,9 +102,9 @@ uintptr runtime·sizeof_C_MStats = sizeof(MStats) - (NumSizeClasses - 61) * size #define MaxArena32 (2U<<30) -// For use by Go. It can't be a constant in Go, unfortunately, -// because it depends on the OS. -uintptr runtime·maxMem = MaxMem; +// For use by Go. If it were a C enum it would be made available automatically, +// but the value of MaxMem is too large for enum. +uintptr runtime·maxmem = MaxMem; void runtime·mallocinit(void) -- cgit v1.3