diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-16 10:22:15 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-16 10:22:15 -0400 |
| commit | d2574e2adb658b46ea2d8e22b3195cc14da1affe (patch) | |
| tree | 58810c5dfaf8842fa3584530cc0c8ccfa1be6b62 /src/runtime/malloc.c | |
| parent | 8d61334dd5b08c8076e343aa33197bd219cdf922 (diff) | |
| download | go-d2574e2adb658b46ea2d8e22b3195cc14da1affe.tar.xz | |
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
Diffstat (limited to 'src/runtime/malloc.c')
| -rw-r--r-- | src/runtime/malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
