Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AllocRange (0.37 sec)

  1. src/runtime/mpallocbits.go

    // structure change.
    type pallocData struct {
    	pallocBits
    	scavenged pageBits
    }
    
    // allocRange sets bits [i, i+n) in the bitmap to 1 and
    // updates the scavenged bits appropriately.
    func (m *pallocData) allocRange(i, n uint) {
    	// Clear the scavenged bits when we alloc the range.
    	m.pallocBits.allocRange(i, n)
    	m.scavenged.clearRange(i, n)
    }
    
    // allocAll sets every bit in the bitmap to 1 and updates
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 15:13:43 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. src/runtime/mpallocbits_test.go

    // the ranges in s to 1 and the rest to zero.
    func makePallocBits(s []BitRange) *PallocBits {
    	b := new(PallocBits)
    	for _, v := range s {
    		b.AllocRange(v.I, v.N)
    	}
    	return b
    }
    
    // Ensures that PallocBits.AllocRange works, which is a fundamental
    // method used for testing and initialization since it's used by
    // makePallocBits.
    func TestPallocBitsAllocRange(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 17 22:00:17 UTC 2020
    - 13.7K bytes
    - Viewed (0)
  3. src/runtime/mpagealloc.go

    				p.summary[l][i] = sum
    			}
    		}
    	}
    }
    
    // allocRange marks the range of memory [base, base+npages*pageSize) as
    // allocated. It also updates the summaries to reflect the newly-updated
    // bitmap.
    //
    // Returns the amount of scavenged memory in bytes present in the
    // allocated range.
    //
    // p.mheapLock must be held.
    func (p *pageAlloc) allocRange(base, npages uintptr) uintptr {
    	assertLockHeld(p.mheapLock)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  4. src/runtime/mgcscavenge_test.go

    func makePallocData(alloc, scavenged []BitRange) *PallocData {
    	b := new(PallocData)
    	for _, v := range alloc {
    		if v.N == 0 {
    			// Skip N==0. It's harmless and allocRange doesn't
    			// handle this case.
    			continue
    		}
    		b.AllocRange(v.I, v.N)
    	}
    	for _, v := range scavenged {
    		if v.N == 0 {
    			// See the previous loop.
    			continue
    		}
    		b.ScavengedSetRange(v.I, v.N)
    	}
    	return b
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  5. src/runtime/export_test.go

    		// Apply alloc state.
    		for _, s := range init {
    			// Ignore the case of s.N == 0. allocRange doesn't handle
    			// it and it's a no-op anyway.
    			if s.N != 0 {
    				chunk.allocRange(s.I, s.N)
    
    				// Make sure the scavenge index is updated.
    				p.scav.index.alloc(ci, s.N)
    			}
    		}
    
    		// Update heap metadata for the allocRange calls above.
    		systemstack(func() {
    			lock(p.mheapLock)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top