Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for clearRange (0.27 sec)

  1. src/runtime/mpallocbits.go

    func (b *pageBits) setBlock64(i uint, v uint64) {
    	b[i/64] |= v
    }
    
    // clear clears bit i of pageBits.
    func (b *pageBits) clear(i uint) {
    	b[i/64] &^= 1 << (i % 64)
    }
    
    // clearRange clears bits in the range [i, i+n).
    func (b *pageBits) clearRange(i, n uint) {
    	_ = b[i/64]
    	if n == 1 {
    		// Fast path for the n == 1 case.
    		b.clear(i)
    		return
    	}
    	// Clear bits [i, j].
    	j := i + n - 1
    	if i/64 == j/64 {
    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/export_test.go

    		})
    
    		// Initialize the bitmap and update pageAlloc metadata.
    		ci := chunkIndex(addr)
    		chunk := p.chunkOf(ci)
    
    		// Clear all the scavenged bits which grow set.
    		chunk.scavenged.clearRange(0, pallocChunkPages)
    
    		// Simulate the allocation and subsequent free of all pages in
    		// the chunk for the scavenge index. This sets the state equivalent
    		// with all pages within the index being free.
    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