- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for findScavengeCandidate (0.35 sec)
-
src/runtime/mgcscavenge.go
// result to set all the bits. return ^((x - (x >> (m - 1))) | x) } // findScavengeCandidate returns a start index and a size for this pallocData // segment which represents a contiguous region of free and unscavenged memory. // // searchIdx indicates the page index within this chunk to start the search, but // note that findScavengeCandidate searches backwards through the pallocData. As
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:48:45 UTC 2024 - 52.3K bytes - Viewed (0) -
src/runtime/mgcscavenge_test.go
want: BitRange{PallocChunkPages - 1, 1}, } } } for name, v := range tests { v := v t.Run(name, func(t *testing.T) { b := makePallocData(v.alloc, v.scavenged) start, size := b.FindScavengeCandidate(PallocChunkPages-1, v.min, v.max) got := BitRange{start, size} if !(got.N == 0 && v.want.N == 0) && got != v.want { t.Fatalf("candidate mismatch: got %v, want %v", got, v.want) } }) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 25.2K bytes - Viewed (0) -
src/runtime/export_test.go
} else { str += "0" } } return str } // Expose pallocData for testing. type PallocData pallocData func (d *PallocData) FindScavengeCandidate(searchIdx uint, min, max uintptr) (uint, uint) { return (*pallocData)(d).findScavengeCandidate(searchIdx, min, max) } func (d *PallocData) AllocRange(i, n uint) { (*pallocData)(d).allocRange(i, n) } func (d *PallocData) ScavengedSetRange(i, n uint) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0)