diff options
| author | Austin Clements <austin@google.com> | 2018-10-04 10:46:20 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2018-10-04 16:14:44 +0000 |
| commit | 4c1c839a3d2270d846f5a6d1cd1287e8560f0265 (patch) | |
| tree | 73a1d39a2cb46c31d12579cbffd807efb711c820 /src/runtime/malloc.go | |
| parent | 011b8eb6bb9783ec6b22697810863f30ca7bda1f (diff) | |
| download | go-4c1c839a3d2270d846f5a6d1cd1287e8560f0265.tar.xz | |
runtime: clarify table of arena sizes
Currently the table of arena sizes mixes the number of entries in the
L1 with the size of the L2. While the size of the L2 is important,
this makes it hard to see what's actually going on because there's an
implicit factor of sys.PtrSize.
This changes the L2 column to say both the number of entries and the
size that results in. This should hopefully make the relations between
the columns of the table clearer, since they can now be plugged
directly into the given formula.
Change-Id: Ie677adaef763b893a2f620bd4fc3b8db314b3a1e
Reviewed-on: https://go-review.googlesource.com/c/139697
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index c3fe1169dc..791bbe7850 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -216,16 +216,16 @@ const ( // The number of bits in a heap address, the size of heap // arenas, and the L1 and L2 arena map sizes are related by // - // (1 << addrBits) = arenaBytes * L1entries * L2entries + // (1 << addr bits) = arena size * L1 entries * L2 entries // // Currently, we balance these as follows: // - // Platform Addr bits Arena size L1 entries L2 size - // -------------- --------- ---------- ---------- ------- - // */64-bit 48 64MB 1 32MB - // windows/64-bit 48 4MB 64 8MB - // */32-bit 32 4MB 1 4KB - // */mips(le) 31 4MB 1 2KB + // Platform Addr bits Arena size L1 entries L2 entries + // -------------- --------- ---------- ---------- ----------- + // */64-bit 48 64MB 1 4M (32MB) + // windows/64-bit 48 4MB 64 1M (8MB) + // */32-bit 32 4MB 1 1024 (4KB) + // */mips(le) 31 4MB 1 512 (2KB) // heapArenaBytes is the size of a heap arena. The heap // consists of mappings of size heapArenaBytes, aligned to |
