Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for uncacheSpan (0.23 sec)

  1. src/runtime/mcache.go

    	}
    	if s != &emptymspan {
    		// Mark this span as no longer cached.
    		if s.sweepgen != mheap_.sweepgen+3 {
    			throw("bad sweepgen in refill")
    		}
    		mheap_.central[spc].mcentral.uncacheSpan(s)
    
    		// Count up how many slots were used and record it.
    		stats := memstats.heapStats.acquire()
    		slotsUsed := int64(s.allocCount) - int64(s.allocCountBeforeCache)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. src/runtime/mcentral.go

    	s.allocCache >>= s.freeindex % 64
    
    	return s
    }
    
    // Return span from an mcache.
    //
    // s must have a span class corresponding to this
    // mcentral and it must not be empty.
    func (c *mcentral) uncacheSpan(s *mspan) {
    	if s.allocCount == 0 {
    		throw("uncaching span but s.allocCount == 0")
    	}
    
    	sg := mheap_.sweepgen
    	stale := s.sweepgen == sg+1
    
    	// Fix up sweepgen.
    	if stale {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top