Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Greenspan (0.33 sec)

  1. src/runtime/mgcsweep.go

    			// an unswept set, then the mcentral will pop it off the
    			// set, check its sweepgen, and ignore it.
    			if nalloc == 0 {
    				// Free totally free span directly back to the heap.
    				mheap_.freeSpan(s)
    				return true
    			}
    			// Return span back to the right mcentral list.
    			if nalloc == s.nelems {
    				mheap_.central[spc].mcentral.fullSwept(sweepgen).push(s)
    			} else {
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-05-08 17:52
    - 32.9K bytes
    - Viewed (0)
  2. src/runtime/gc_test.go

    		runtime.GC()
    		b.StopTimer()
    	}
    	close(teardown)
    }
    
    func BenchmarkMSpanCountAlloc(b *testing.B) {
    	// Allocate one dummy mspan for the whole benchmark.
    	s := runtime.AllocMSpan()
    	defer runtime.FreeMSpan(s)
    
    	// n is the number of bytes to benchmark against.
    	// n must always be a multiple of 8, since gcBits is
    	// always rounded up 8 bytes.
    	for _, n := range []int{8, 16, 32, 64, 128} {
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-06-05 22:33
    - 17.6K bytes
    - Viewed (0)
  3. src/runtime/export_test.go

    	var s *mspan
    	systemstack(func() {
    		lock(&mheap_.lock)
    		s = (*mspan)(mheap_.spanalloc.alloc())
    		unlock(&mheap_.lock)
    	})
    	return (*MSpan)(s)
    }
    
    // Free an allocated mspan.
    func FreeMSpan(s *MSpan) {
    	systemstack(func() {
    		lock(&mheap_.lock)
    		mheap_.spanalloc.free(unsafe.Pointer(s))
    		unlock(&mheap_.lock)
    	})
    }
    
    func MSpanCountAlloc(ms *MSpan, bits []byte) int {
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-05-30 17:50
    - 46.1K bytes
    - Viewed (0)
  4. src/runtime/mheap.go

    	// space ready for allocation.
    	h.pages.grow(v, nBase-v)
    	totalGrowth += nBase - v
    	return totalGrowth, true
    }
    
    // Free the span back into the heap.
    func (h *mheap) freeSpan(s *mspan) {
    	systemstack(func() {
    		// Trace the span free.
    		if traceAllocFreeEnabled() {
    			trace := traceTryAcquire()
    			if trace.ok() {
    				trace.SpanFree(s)
    				traceRelease(trace)
    			}
    Registered: 2024-06-12 16:32
    - Last Modified: 2024-05-22 22:31
    - 78K bytes
    - Viewed (0)
Back to top