From bff79f273b81b32d58c2d0b5247f6708e707f7cb Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 13 Oct 2023 15:57:30 +0900 Subject: [PATCH] Fix bitstring order in precise GC docs (#3947) docs: Fix bitstring order in precise GC docs --- src/runtime/gc_precise.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/gc_precise.go b/src/runtime/gc_precise.go index 79a3785564..4c7463b8ec 100644 --- a/src/runtime/gc_precise.go +++ b/src/runtime/gc_precise.go @@ -17,11 +17,11 @@ // // | object type | size | bitstring | note // |-------------|------|-----------|------ -// | int | 1 | 0 | no pointers in this object -// | string | 2 | 10 | {pointer, len} pair so there is one pointer -// | []int | 3 | 100 | {pointer, len, cap} -// | [4]*int | 1 | 1 | even though it contains 4 pointers, an array repeats so it can be stored with size=1 -// | [30]byte | 1 | 0 | there are no pointers so the layout is very simple +// | int | 1 | 0 | no pointers in this object +// | string | 2 | 01 | {pointer, len} pair so there is one pointer +// | []int | 3 | 001 | {pointer, len, cap} +// | [4]*int | 1 | 1 | even though it contains 4 pointers, an array repeats so it can be stored with size=1 +// | [30]byte | 1 | 0 | there are no pointers so the layout is very simple // // The garbage collector scans objects by starting at the first word value in // the object. If the least significant bit of the bitstring is clear, it is