Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 553 for mheap (0.04 sec)

  1. src/runtime/mgcmark.go

    	//
    	// We're going to scan the whole heap (that was available at the time the
    	// mark phase started, i.e. markArenas) for in-use spans which have specials.
    	//
    	// Break up the work into arenas, and further into chunks.
    	//
    	// Snapshot allArenas as markArenas. This snapshot is safe because allArenas
    	// is append-only.
    	mheap_.markArenas = mheap_.allArenas[:len(mheap_.allArenas):len(mheap_.allArenas)]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 52.5K 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)
    	})
    }
    
    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/stack.go

    			s = stackLarge.free[log2npage].first
    			stackLarge.free[log2npage].remove(s)
    		}
    		unlock(&stackLarge.lock)
    
    		lockWithRankMayAcquire(&mheap_.lock, lockRankMheap)
    
    		if s == nil {
    			// Allocate a new stack from the heap.
    			s = mheap_.allocManual(npage, spanAllocStack)
    			if s == nil {
    				throw("out of memory")
    			}
    			osStackAlloc(s)
    			s.elemsize = uintptr(n)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  4. src/runtime/mbitmap.go

    	}
    	getg().m.traceback = 2
    	throw("found bad pointer in Go heap (incorrect use of unsafe or cgo?)")
    }
    
    // findObject returns the base address for the heap object containing
    // the address p, the object's span, and the index of the object in s.
    // If p does not point into a heap object, it returns base == 0.
    //
    // If p points is an invalid heap pointer and debug.invalidptr != 0,
    // findObject panics.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  5. test/fixedbugs/issue13799.go

    	// Heap -> stack pointer eventually causes badness when stack reallocation
    	// occurs.
    
    	var fn func() // ERROR "moved to heap: fn$"
    	i := 0        // ERROR "moved to heap: i$"
    	for ; i < maxI; i++ {
    		// var fn func() // this makes it work, because fn stays off heap
    		j := 0        // ERROR "moved to heap: j$"
    		fn = func() { // ERROR "func literal escapes to heap$"
    			m[i] = append(m[i], 0)
    			if j < 25 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  6. test/escape_indir.go

    	x := &ConstPtr{} // ERROR "&ConstPtr{} does not escape"
    	x.p = &i
    	return *x
    }
    
    func constptr03() **ConstPtr {
    	i := 0           // ERROR "moved to heap: i"
    	x := &ConstPtr{} // ERROR "&ConstPtr{} escapes to heap" "moved to heap: x"
    	x.p = &i
    	return &x
    }
    
    func constptr1() {
    	i := 0           // ERROR "moved to heap: i"
    	x := &ConstPtr{} // ERROR "&ConstPtr{} escapes to heap"
    	x.p = &i
    	sink = x
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 3.3K bytes
    - Viewed (0)
  7. src/runtime/pprof/pprof.go

    // output to a writer during profiling.
    //
    // # Heap profile
    //
    // The heap profile reports statistics as of the most recently completed
    // garbage collection; it elides more recent allocation to avoid skewing
    // the profile away from live data and toward garbage.
    // If there has been no garbage collection at all, the heap profile reports
    // all known allocations. This exception helps mainly in programs running
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  8. src/internal/trace/batchcursor_test.go

    	heap[len(heap)-1].ev.time = 21
    	heapUpdate(heap, len(heap)-1)
    	checkHeap(t, heap)
    	if heap[len(heap)-1].ev.time != 21 {
    		t.Fatalf("heap update failed, expected %d as heap min: %s", 21, heapDebugString(heap))
    	}
    
    	// Update the last element to be smaller.
    	heap[len(heap)-1].ev.time = 7
    	heapUpdate(heap, len(heap)-1)
    	checkHeap(t, heap)
    	if heap[len(heap)-1].ev.time == 21 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. test/escape_closure.go

    func ClosureCallArgs9() {
    	// BAD: x should not leak
    	x := 0 // ERROR "moved to heap: x"
    	for {
    		defer func(p *int) { // ERROR "func literal escapes to heap" "p does not escape"
    			*p = 1
    		}(&x)
    	}
    }
    
    func ClosureCallArgs10() {
    	for {
    		x := 0               // ERROR "moved to heap: x"
    		defer func(p *int) { // ERROR "func literal escapes to heap" "p does not escape"
    			*p = 1
    		}(&x)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 16:36:09 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  10. src/internal/trace/batchcursor.go

    	heapSiftDown(heap, i)
    }
    
    func heapRemove(heap []*batchCursor, i int) []*batchCursor {
    	// Sift index i up to the root, ignoring actual values.
    	for i > 0 {
    		heap[(i-1)/2], heap[i] = heap[i], heap[(i-1)/2]
    		i = (i - 1) / 2
    	}
    	// Swap the root with the last element, then remove it.
    	heap[0], heap[len(heap)-1] = heap[len(heap)-1], heap[0]
    	heap = heap[:len(heap)-1]
    	// Sift the root down.
    	heapSiftDown(heap, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top