Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MakeAddrRanges (0.25 sec)

  1. src/runtime/mranges_test.go

    		},
    		{
    			name:   "LargeWithinMiddle",
    			base:   250,
    			expect: 50,
    			ranges: large,
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			a := MakeAddrRanges(test.ranges...)
    			i := a.FindSucc(test.base)
    			if i != test.expect {
    				t.Fatalf("expected %d, got %d", test.expect, i)
    			}
    		})
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 23 23:01:52 UTC 2020
    - 5.7K bytes
    - Viewed (0)
  2. src/runtime/export_test.go

    // 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 {
    	// Methods that manipulate the backing store of addrRanges.ranges should
    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