- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Scav (0.04 sec)
-
src/runtime/mpagecache_test.go
t.Errorf("bad pageCache bits: got %016x, want %016x", got.Base(), want.Base()) } if got.Scav() != want.Scav() { t.Errorf("bad pageCache scav: got %016x, want %016x", got.Scav(), want.Scav()) } } func TestPageCacheAlloc(t *testing.T) { base := PageBase(BaseChunkIdx, 0) type hit struct { npages uintptr base uintptr scav uintptr } tests := map[string]struct { cache PageCache hits []hit }{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 06 19:16:48 UTC 2021 - 10.8K bytes - Viewed (0) -
src/runtime/mpagealloc_test.go
t.Run(name, func(t *testing.T) { b := NewPageAlloc(v.before, v.scav) defer FreePageAlloc(b) for iter, i := range v.hits { a, s := b.Alloc(i.npages) if a != i.base { t.Fatalf("bad alloc #%d: want base 0x%x, got 0x%x", iter+1, i.base, a) } if s != i.scav { t.Fatalf("bad alloc #%d: want scav %d, got %d", iter+1, i.scav, s) } } want := NewPageAlloc(v.after, v.scav)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 06 19:16:48 UTC 2021 - 32.6K bytes - Viewed (0) -
src/runtime/mpagecache.go
if c.cache == 0 { return 0, 0 } if npages == 1 { i := uintptr(sys.TrailingZeros64(c.cache)) scav := (c.scav >> i) & 1 c.cache &^= 1 << i // set bit to mark in-use c.scav &^= 1 << i // clear bit to mark unscavenged return c.base + i*pageSize, uintptr(scav) * pageSize } return c.allocN(npages) } // allocN is a helper which attempts to allocate npages worth of pages
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 19 14:30:00 UTC 2023 - 5.6K bytes - Viewed (0) -
src/runtime/mpagealloc.go
p.scav.index.alloc(sc, pallocChunkPages-si) for c := sc + 1; c < ec; c++ { chunk := p.chunkOf(c) scav += chunk.scavenged.popcntRange(0, pallocChunkPages) chunk.allocAll() p.scav.index.alloc(c, pallocChunkPages) } chunk = p.chunkOf(ec) scav += chunk.scavenged.popcntRange(0, ei+1) chunk.allocRange(0, ei+1) p.scav.index.alloc(ec, ei+1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 39.2K bytes - Viewed (0) -
src/runtime/export_test.go
func NewPageCache(base uintptr, cache, scav uint64) PageCache { return PageCache(pageCache{base: base, cache: cache, scav: scav}) } func (c *PageCache) Empty() bool { return (*pageCache)(c).empty() } func (c *PageCache) Base() uintptr { return (*pageCache)(c).base } func (c *PageCache) Cache() uint64 { return (*pageCache)(c).cache } func (c *PageCache) Scav() uint64 { return (*pageCache)(c).scav }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0) -
src/runtime/mheap.go
nbytes := npages * pageSize if scav != 0 { // sysUsed all the pages that are actually available // in the span since some of them might be scavenged. sysUsed(unsafe.Pointer(base), nbytes, scav) gcController.heapReleased.add(-int64(scav)) } // Update stats. gcController.heapFree.add(-int64(nbytes - scav)) if typ == spanAllocHeap { gcController.heapInUse.add(int64(nbytes))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 78K bytes - Viewed (0) -
src/runtime/mpagealloc_32bit.go
logPallocChunkPages + 3*summaryLevelBits, logPallocChunkPages + 2*summaryLevelBits, logPallocChunkPages + 1*summaryLevelBits, logPallocChunkPages, } // scavengeIndexArray is the backing store for p.scav.index.chunks. // On 32-bit platforms, it's small enough to just be a global. var scavengeIndexArray [(1 << heapAddrBits) / pallocChunkBytes]atomicScavChunkData // See mpagealloc_64bit.go for details.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 20 20:08:25 UTC 2023 - 4.6K bytes - Viewed (0) -
src/runtime/mgcsweep.go
lock(&mheap_.lock) // Get released stats. releasedBg := mheap_.pages.scav.releasedBg.Load() releasedEager := mheap_.pages.scav.releasedEager.Load() // Print the line. printScavTrace(releasedBg, releasedEager, false) // Update the stats. mheap_.pages.scav.releasedBg.Add(-releasedBg) mheap_.pages.scav.releasedEager.Add(-releasedEager) unlock(&mheap_.lock) }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:52:18 UTC 2024 - 32.9K bytes - Viewed (0) -
src/runtime/mpagealloc_64bit.go
sysUsed(unsafe.Pointer(need.base.addr()), need.size(), need.size()) p.summaryMappedReady += need.size() } // Update the scavenge index. p.summaryMappedReady += p.scav.index.sysGrow(base, limit, p.sysStat) } // sysGrow increases the index's backing store in response to a heap growth. // // Returns the amount of memory added to sysStat.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 03 11:00:10 UTC 2024 - 9.3K bytes - Viewed (0) -
src/runtime/mgcscavenge.go
// response, broke down. This may be transient, so temporarily switch to // sleeping a fixed, conservative amount. s.sleepRatio = startingScavSleepRatio s.controllerCooldown = 5e9 // 5 seconds. // Signal the scav trace printer to output this. s.controllerFailed() } } // controllerFailed indicates that the scavenger's scheduling // controller failed. func (s *scavengerState) controllerFailed() { lock(&s.lock)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:48:45 UTC 2024 - 52.3K bytes - Viewed (0)