Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for pallocSum (0.18 sec)

  1. src/runtime/mpallocbits_test.go

    	type test struct {
    		free []BitRange // Ranges of free (zero) bits.
    		hits []PallocSum
    	}
    	tests := make(map[string]test)
    	tests["NoneFree"] = test{
    		free: []BitRange{},
    		hits: []PallocSum{
    			PackPallocSum(0, 0, 0),
    		},
    	}
    	tests["OnlyStart"] = test{
    		free: []BitRange{{0, 10}},
    		hits: []PallocSum{
    			PackPallocSum(10, 10, 0),
    		},
    	}
    	tests["OnlyEnd"] = test{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 17 22:00:17 UTC 2020
    - 13.7K bytes
    - Viewed (0)
  2. src/runtime/mpagealloc.go

    func packPallocSum(start, max, end uint) pallocSum {
    	if max == maxPackedValue {
    		return pallocSum(uint64(1 << 63))
    	}
    	return pallocSum((uint64(start) & (maxPackedValue - 1)) |
    		((uint64(max) & (maxPackedValue - 1)) << logMaxPackedValue) |
    		((uint64(end) & (maxPackedValue - 1)) << (2 * logMaxPackedValue)))
    }
    
    // start extracts the start value from a packed sum.
    func (p pallocSum) start() uint {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  3. src/runtime/export_test.go

    	PallocSumBytes   = pallocSumBytes
    )
    
    // Expose pallocSum for testing.
    type PallocSum pallocSum
    
    func PackPallocSum(start, max, end uint) PallocSum { return PallocSum(packPallocSum(start, max, end)) }
    func (m PallocSum) Start() uint                    { return pallocSum(m).start() }
    func (m PallocSum) Max() uint                      { return pallocSum(m).max() }
    func (m PallocSum) End() uint                      { return pallocSum(m).end() }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  4. src/runtime/mpallocbits.go

    // sake of documentation, 0s are free pages and 1s are allocated pages.
    type pallocBits pageBits
    
    // summarize returns a packed summary of the bitmap in pallocBits.
    func (b *pallocBits) summarize() pallocSum {
    	var start, most, cur uint
    	const notSetYet = ^uint(0) // sentinel for start value
    	start = notSetYet
    	for i := 0; i < len(b); i++ {
    		x := b[i]
    		if x == 0 {
    			cur += 64
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 15:13:43 UTC 2024
    - 12.5K bytes
    - Viewed (0)
Back to top