Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ChunkIdx (0.09 sec)

  1. src/runtime/mpagealloc_test.go

    	type hit struct {
    		npages, base, scav uintptr
    	}
    	type test struct {
    		scav   map[ChunkIdx][]BitRange
    		before map[ChunkIdx][]BitRange
    		after  map[ChunkIdx][]BitRange
    		hits   []hit
    	}
    	tests := map[string]test{
    		"AllFree1": {
    			before: map[ChunkIdx][]BitRange{
    				BaseChunkIdx: {},
    			},
    			scav: map[ChunkIdx][]BitRange{
    				BaseChunkIdx: {{0, 1}, {2, 2}},
    			},
    			hits: []hit{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 06 19:16:48 UTC 2021
    - 32.6K bytes
    - Viewed (0)
  2. src/runtime/mpagecache_test.go

    	}
    	type test struct {
    		beforeAlloc map[ChunkIdx][]BitRange
    		beforeScav  map[ChunkIdx][]BitRange
    		hits        []PageCache // expected base addresses and patterns
    		afterAlloc  map[ChunkIdx][]BitRange
    		afterScav   map[ChunkIdx][]BitRange
    	}
    	tests := map[string]test{
    		"AllFree": {
    			beforeAlloc: map[ChunkIdx][]BitRange{
    				BaseChunkIdx: {},
    			},
    			beforeScav: map[ChunkIdx][]BitRange{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 06 19:16:48 UTC 2021
    - 10.8K bytes
    - Viewed (0)
  3. src/runtime/mgcscavenge_test.go

    	}
    	type setup struct {
    		beforeAlloc map[ChunkIdx][]BitRange
    		beforeScav  map[ChunkIdx][]BitRange
    		expect      []test
    		afterScav   map[ChunkIdx][]BitRange
    	}
    	tests := map[string]setup{
    		"AllFreeUnscavExhaust": {
    			beforeAlloc: map[ChunkIdx][]BitRange{
    				BaseChunkIdx:     {},
    				BaseChunkIdx + 1: {},
    				BaseChunkIdx + 2: {},
    			},
    			beforeScav: map[ChunkIdx][]BitRange{
    				BaseChunkIdx:     {},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  4. src/runtime/export_test.go

    		// take the lock internally.
    		lock(pp.mheapLock)
    		pp.free(base, npages)
    		unlock(pp.mheapLock)
    	})
    }
    func (p *PageAlloc) Bounds() (ChunkIdx, ChunkIdx) {
    	return ChunkIdx((*pageAlloc)(p).start), ChunkIdx((*pageAlloc)(p).end)
    }
    func (p *PageAlloc) Scavenge(nbytes uintptr) (r uintptr) {
    	pp := (*pageAlloc)(p)
    	systemstack(func() {
    		r = pp.scavenge(nbytes, nil, true)
    	})
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  5. src/runtime/mpagealloc.go

    // space into chunks.
    type chunkIdx uint
    
    // chunkIndex returns the global index of the palloc chunk containing the
    // pointer p.
    func chunkIndex(p uintptr) chunkIdx {
    	return chunkIdx((p - arenaBaseOffset) / pallocChunkBytes)
    }
    
    // chunkBase returns the base address of the palloc chunk at index ci.
    func chunkBase(ci chunkIdx) uintptr {
    	return uintptr(ci)*pallocChunkBytes + arenaBaseOffset
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  6. src/runtime/mgcscavenge.go

    //
    // Returns the number of bytes scavenged.
    //
    // Must run on the systemstack because it acquires p.mheapLock.
    //
    //go:systemstack
    func (p *pageAlloc) scavengeOne(ci chunkIdx, searchIdx uint, max uintptr) uintptr {
    	// Calculate the maximum number of pages to scavenge.
    	//
    	// This should be alignUp(max, pageSize) / pageSize but max can and will
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:48:45 UTC 2024
    - 52.3K bytes
    - Viewed (0)
Back to top