Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for pallocSum (0.15 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/mpagealloc_32bit.go

    	for l, shift := range levelShift {
    		entries := 1 << (heapAddrBits - shift)
    
    		// Put this reservation into a slice.
    		sl := notInHeapSlice{(*notInHeap)(reservation), 0, entries}
    		p.summary[l] = *(*[]pallocSum)(unsafe.Pointer(&sl))
    
    		reservation = add(reservation, uintptr(entries)*pallocSumBytes)
    	}
    }
    
    // See mpagealloc_64bit.go for details.
    func (p *pageAlloc) sysGrow(base, limit uintptr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 20 20:08:25 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  5. src/runtime/mpagealloc_64bit.go

    		r := sysReserve(nil, b)
    		if r == nil {
    			throw("failed to reserve page summary memory")
    		}
    
    		// Put this reservation into a slice.
    		sl := notInHeapSlice{(*notInHeap)(r), 0, entries}
    		p.summary[l] = *(*[]pallocSum)(unsafe.Pointer(&sl))
    	}
    }
    
    // sysGrow performs architecture-dependent operations on heap
    // growth for the page allocator, such as mapping in new memory
    // for summaries. It also updates the length of the slices in
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 03 11:00:10 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. 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