Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for FreeMSpan (0.26 sec)

  1. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. 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: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top