Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ChunkIdx (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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