From 33b76920ec3bde98e58e0a6cb0816eb7be28bb4e Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 22 Feb 2018 12:35:30 -0500 Subject: [PATCH] runtime: rename "arena index" to "arena map" There are too many places where I want to talk about "indexing into the arena index". Make this less awkward and ambiguous by calling it the "arena map" instead. Change-Id: I726b0667bb2139dbc006175a0ec09a871cdf73f9 Reviewed-on: https://go-review.googlesource.com/96777 Run-TryBot: Austin Clements Reviewed-by: Rick Hudson --- src/runtime/malloc.go | 14 +++++++------- src/runtime/mbitmap.go | 2 +- src/runtime/mheap.go | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 6c36e1eea3..6f78455c8b 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -90,12 +90,12 @@ // themselves allocated off-heap. // // Since arenas are aligned, the address space can be viewed as a -// series of arena frames. The arena index (mheap_.arenas) maps from +// series of arena frames. The arena map (mheap_.arenas) maps from // arena frame number to *heapArena, or nil for parts of the address // space not backed by the Go heap. Since arenas are large, the arena // index is just a single-level mapping. // -// The arena index covers the entire possible address space, allowing +// The arena map covers the entire possible address space, allowing // the Go heap to use any part of the address space. The allocator // attempts to keep arenas contiguous so that large spans (and hence // large objects) can cross arenas. @@ -203,10 +203,10 @@ const ( // mips32 only has access to the low 2GB of virtual memory, so // we further limit it to 31 bits. // - // The size of the arena index is proportional to + // The size of the arena map is proportional to // 1<maxsmallsize) nsmallfree [_NumSizeClasses]uint64 // number of frees for small objects (<=maxsmallsize) - // arenas is the heap arena index. + // arenas is the heap arena map. // arenas[(va+arenaBaseOffset)/heapArenaBytes] points to the // metadata for the heap arena containing va. // // Use arenaIndex to compute indexes into this array. // // For regions of the address space that are not backed by the - // Go heap, the arena index contains nil. + // Go heap, the arena map contains nil. // // Modifications are protected by mheap_.lock. Reads can be // performed without locking; however, a given entry can