- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for AllocateCounters (0.12 sec)
-
src/internal/coverage/calloc/batchcounteralloc.go
// live/dead over the same time period, so a good fit for batch // allocation. type BatchCounterAlloc struct { pool []uint32 } func (ca *BatchCounterAlloc) AllocateCounters(n int) []uint32 { const chunk = 8192 if n > cap(ca.pool) { siz := chunk if n > chunk { siz = n } ca.pool = make([]uint32, siz) } rv := ca.pool[:n] ca.pool = ca.pool[n:] return rv
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 28 11:47:16 UTC 2022 - 754 bytes - Viewed (0) -
src/internal/coverage/cfile/testsupport.go
// Note: no overflow reporting here. if err, _ := ts.cm.MergeCounters(data.Counters, prev); err != nil { return fmt.Errorf("processing counter data file %s: %v", cdf, err) } } c := ts.AllocateCounters(len(data.Counters)) copy(c, data.Counters) pmm[key] = c } return nil } // Read counter data files. for _, cdf := range p.CounterDataFiles { if err := readcdf(cdf); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:57:47 UTC 2024 - 8.7K bytes - Viewed (0)