Skip to content

Commit

Permalink
Fix bitstring order in precise GC docs (#3947)
Browse files Browse the repository at this point in the history
docs: Fix bitstring order in precise GC docs
  • Loading branch information
anuraaga authored Oct 13, 2023
1 parent 75bba42 commit c2f1965
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/runtime/gc_precise.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2f1965

Please sign in to comment.