diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-03-12 12:22:18 +1300 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2015-03-31 22:45:07 +0000 |
| commit | 67426a8a9eabd6d859e42ca799eab6c1aa0d616a (patch) | |
| tree | 60916c7f4daecc25a0b7945324c1529354d36ed0 /src/runtime/malloc.go | |
| parent | 0de359da301d1ed5a63c87a8853bedbd829ab906 (diff) | |
| download | go-67426a8a9eabd6d859e42ca799eab6c1aa0d616a.tar.xz | |
runtime, cmd/internal/ld: change runtime to use a single linker symbol
In preparation for being able to run a go program that has code
in several objects, this changes from having several linker
symbols used by the runtime into having one linker symbol that
points at a structure containing the needed data. Multiple
object support will construct a linked list of such structures.
A follow up will initialize the slices in the themoduledata
structure directly from the linker but I was aiming for a minimal
diff for now.
Change-Id: I613cce35309801cf265a1d5ae5aaca8d689c5cbf
Reviewed-on: https://go-review.googlesource.com/7441
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 11d6f94e54..fde58e2d0c 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -322,7 +322,7 @@ func mallocinit() { // So adjust it upward a little bit ourselves: 1/4 MB to get // away from the running binary image and then round up // to a MB boundary. - p = round(uintptr(unsafe.Pointer(&end))+(1<<18), 1<<20) + p = round(themoduledata.end+(1<<18), 1<<20) pSize = bitmapSize + spansSize + arenaSize + _PageSize p = uintptr(sysReserve(unsafe.Pointer(p), pSize, &reserved)) if p != 0 { |
