Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for AddrRanges (0.14 sec)

  1. src/runtime/mranges.go

    }
    
    // addrRanges is a data structure holding a collection of ranges of
    // address space.
    //
    // The ranges are coalesced eagerly to reduce the
    // number ranges it holds.
    //
    // The slice backing store for this field is persistentalloc'd
    // and thus there is no way to free it.
    //
    // addrRanges is not thread-safe.
    type addrRanges struct {
    	// ranges is a slice of ranges sorted by base.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  2. src/runtime/export_test.go

    // leaked.
    //
    // This AddrRanges is mutable, so we can test methods like
    // Add.
    func NewAddrRanges() AddrRanges {
    	r := addrRanges{}
    	r.init(testSysStat)
    	return AddrRanges{r, true}
    }
    
    // MakeAddrRanges creates a new addrRanges populated with
    // the ranges in a.
    //
    // The returned AddrRanges is immutable, so methods like
    // Add will fail.
    func MakeAddrRanges(a ...AddrRange) AddrRanges {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  3. src/runtime/mranges_test.go

    	}
    	if b := a.TotalBytes(); b != gotTotalBytes {
    		t.Errorf("inconsistent total bytes: want %d, got %d", gotTotalBytes, b)
    	}
    	if t.Failed() {
    		t.Errorf("addrRanges: %v", ranges)
    		t.Fatal("detected bad addrRanges")
    	}
    }
    
    func TestAddrRangesAdd(t *testing.T) {
    	a := NewAddrRanges()
    
    	// First range.
    	a.Add(MakeAddrRange(512, 1024))
    	validateAddrRanges(t, &a,
    		MakeAddrRange(512, 1024),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 23 23:01:52 UTC 2020
    - 5.7K bytes
    - Viewed (0)
  4. src/runtime/mpagealloc.go

    	// and take additional measures to ensure that, so in nearly all
    	// cases this should have just 1 element.
    	//
    	// All access is protected by the mheapLock.
    	inUse addrRanges
    
    	// scav stores the scavenger state.
    	scav struct {
    		// index is an efficient index of chunks that have pages available to
    		// scavenge.
    		index scavengeIndex
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
Back to top