Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for checkPageAlloc (0.12 sec)

  1. src/runtime/mpagecache_test.go

    		afterScav := map[ChunkIdx][]BitRange{
    			BaseChunkIdx: bits64ToBitRanges(scav, base),
    		}
    		want := NewPageAlloc(afterAlloc, afterScav)
    		defer FreePageAlloc(want)
    
    		// Check to see if it worked.
    		checkPageAlloc(t, want, b)
    	}
    
    	// Empty.
    	runTest(t, 0, 0, 0)
    
    	// Full.
    	runTest(t, 0, ^uint64(0), ^uint64(0))
    
    	// Random.
    	for i := 0; i < 100; i++ {
    		// Generate random valid base within a chunk.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 06 19:16:48 UTC 2021
    - 10.8K bytes
    - Viewed (0)
  2. src/runtime/mpagealloc_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime_test
    
    import (
    	"fmt"
    	"internal/goos"
    	. "runtime"
    	"testing"
    )
    
    func checkPageAlloc(t *testing.T, want, got *PageAlloc) {
    	// Ensure start and end are correct.
    	wantStart, wantEnd := want.Bounds()
    	gotStart, gotEnd := got.Bounds()
    	if gotStart != wantStart {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 06 19:16:48 UTC 2021
    - 32.6K bytes
    - Viewed (0)
  3. src/runtime/mgcscavenge_test.go

    					t.Fatalf("bad scavenge #%d: want %d, got %d", iter+1, h.expect, got)
    				}
    			}
    			want := NewPageAlloc(v.beforeAlloc, v.afterScav)
    			defer FreePageAlloc(want)
    
    			checkPageAlloc(t, want, b)
    		})
    	}
    }
    
    func TestScavenger(t *testing.T) {
    	// workedTime is a standard conversion of bytes of scavenge
    	// work to time elapsed.
    	workedTime := func(bytes uintptr) int64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.2K bytes
    - Viewed (0)
Back to top