diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-05-30 17:09:58 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-05-30 17:09:58 +0400 |
| commit | e17281b39779c18fc73779c81a3741b05ea85485 (patch) | |
| tree | d4ab0bc79d7e05844b204d800eeb716c3e9f1f23 /src/pkg/runtime/malloc.goc | |
| parent | 573d25a42342ae094edeafc7066646cf825eb255 (diff) | |
| download | go-e17281b39779c18fc73779c81a3741b05ea85485.tar.xz | |
runtime: rename mheap.maps to mheap.spans
as was dicussed in cl/9791044
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9853046
Diffstat (limited to 'src/pkg/runtime/malloc.goc')
| -rw-r--r-- | src/pkg/runtime/malloc.goc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/runtime/malloc.goc b/src/pkg/runtime/malloc.goc index beea042edc..2ff63bcc13 100644 --- a/src/pkg/runtime/malloc.goc +++ b/src/pkg/runtime/malloc.goc @@ -374,7 +374,7 @@ runtime·mallocinit(void) // If this fails we fall back to the 32 bit memory mechanism arena_size = MaxMem; bitmap_size = arena_size / (sizeof(void*)*8/4); - spans_size = arena_size / PageSize * sizeof(runtime·mheap.map[0]); + spans_size = arena_size / PageSize * sizeof(runtime·mheap.spans[0]); p = runtime·SysReserve((void*)(0x00c0ULL<<32), bitmap_size + spans_size + arena_size); } if (p == nil) { @@ -397,11 +397,11 @@ runtime·mallocinit(void) // of address space, which is probably too much in a 32-bit world. bitmap_size = MaxArena32 / (sizeof(void*)*8/4); arena_size = 512<<20; - spans_size = MaxArena32 / PageSize * sizeof(runtime·mheap.map[0]); + spans_size = MaxArena32 / PageSize * sizeof(runtime·mheap.spans[0]); if(limit > 0 && arena_size+bitmap_size+spans_size > limit) { bitmap_size = (limit / 9) & ~((1<<PageShift) - 1); arena_size = bitmap_size * 8; - spans_size = arena_size / PageSize * sizeof(runtime·mheap.map[0]); + spans_size = arena_size / PageSize * sizeof(runtime·mheap.spans[0]); } // SysReserve treats the address we ask for, end, as a hint, @@ -424,7 +424,7 @@ runtime·mallocinit(void) if((uintptr)p & (((uintptr)1<<PageShift)-1)) runtime·throw("runtime: SysReserve returned unaligned address"); - runtime·mheap.map = (MSpan**)p; + runtime·mheap.spans = (MSpan**)p; runtime·mheap.bitmap = p + spans_size; runtime·mheap.arena_start = p + spans_size + bitmap_size; runtime·mheap.arena_used = runtime·mheap.arena_start; @@ -532,7 +532,7 @@ runtime·settype_flush(M *mp, bool sysalloc) p = (uintptr)v>>PageShift; if(sizeof(void*) == 8) p -= (uintptr)runtime·mheap.arena_start >> PageShift; - s = runtime·mheap.map[p]; + s = runtime·mheap.spans[p]; if(s->sizeclass == 0) { s->types.compression = MTypes_Single; |
