Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 236 for heapUp (0.1 sec)

  1. test/escape_slice.go

    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    	_ = s
    }
    
    func slice1() *int {
    	var s []*int
    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    	return s[0]
    }
    
    func slice2() []*int {
    	var s []*int
    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    	return s
    }
    
    func slice3() *int {
    	var s []*int
    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  2. test/uintptrescapes2.go

    	var v int                         // ERROR "moved to heap"
    	t.M1(uintptr(unsafe.Pointer(&v))) // ERROR "live at call to T.M1: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
    }
    
    func TestF2() {
    	var v int                                 // ERROR "moved to heap"
    	F2(0, 1, uintptr(unsafe.Pointer(&v)), 2)  // ERROR "live at call to newobject: .?autotmp" "live at call to F2: .?autotmp" "escapes to heap" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 24 18:24:24 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  3. test/fixedbugs/issue12006.go

    	for i := 0; i < 1000; i++ {
    		var i, j, k int   // ERROR "moved to heap: i" "moved to heap: j" "moved to heap: k"
    		FooNx(&k, &i, &j) // ERROR "... argument does not escape"
    	}
    }
    
    func TFooNy() {
    	for i := 0; i < 1000; i++ {
    		var i, j, k int   // ERROR "moved to heap: i" "moved to heap: j" "moved to heap: k"
    		FooNy(&k, &i, &j) // ERROR "... argument escapes to heap"
    	}
    }
    
    func TFooNz() {
    	for i := 0; i < 1000; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  4. src/container/heap/example_intheap_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This example demonstrates an integer heap built using the heap interface.
    package heap_test
    
    import (
    	"container/heap"
    	"fmt"
    )
    
    // An IntHeap is a min-heap of ints.
    type IntHeap []int
    
    func (h IntHeap) Len() int           { return len(h) }
    func (h IntHeap) Less(i, j int) bool { return h[i] < h[j] }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  5. test/escape_iface.go

    	}
    	{
    		i := 0       // ERROR "moved to heap: i"
    		v := &M2{&i} // ERROR "&M2{...} escapes to heap"
    		var x M = v
    		sink = x
    	}
    	{
    		i := 0
    		v := &M2{&i} // ERROR "&M2{...} does not escape"
    		var x M = v
    		v1 := x.(*M2)
    		_ = v1
    	}
    	{
    		i := 0       // ERROR "moved to heap: i"
    		v := &M2{&i} // ERROR "&M2{...} escapes to heap"
    		// BAD: v does not escape to heap here
    		var x M = v
    		v1 := x.(*M2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 17:16:35 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. test/fixedbugs/issue39292.go

    func (t) f() {
    }
    
    func x() {
    	x := t{}.f // ERROR "t{}.f escapes to heap"
    	x()
    }
    
    func y() {
    	var i int       // ERROR "moved to heap: i"
    	y := (&t{&i}).f // ERROR "\(&t{...}\).f escapes to heap" "&t{...} escapes to heap"
    	y()
    }
    
    func z() {
    	var i int    // ERROR "moved to heap: i"
    	z := t{&i}.f // ERROR "t{...}.f escapes to heap"
    	z()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 555 bytes
    - Viewed (0)
  7. src/container/heap/example_pq_test.go

    // This example demonstrates a priority queue built using the heap interface.
    package heap_test
    
    import (
    	"container/heap"
    	"fmt"
    )
    
    // An Item is something we manage in a priority queue.
    type Item struct {
    	value    string // The value of the item; arbitrary.
    	priority int    // The priority of the item in the queue.
    	// The index is needed by update and is maintained by the heap.Interface methods.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:27:36 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. test/fixedbugs/issue16095.go

    	}
    
    	// Force x to be allocated on the heap.
    	sink = &x
    	sink = nil
    
    	// Go to deferreturn after the panic below.
    	defer func() {
    		recover()
    	}()
    
    	// This call collects the heap-allocated version of x (oops!)
    	runtime.GC()
    
    	// Allocate that same object again and clobber it.
    	y := new([20]byte)
    	for i := 0; i < 20; i++ {
    		y[i] = 99
    	}
    	// Make sure y is heap allocated.
    	sink = y
    
    	panic(nil)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 27 16:48:48 UTC 2016
    - 1.9K bytes
    - Viewed (0)
  9. src/runtime/internal/sys/nih.go

    // - Maps and channels contains no-in-heap types are disallowed.
    //
    // 4. Write barriers on pointers to not-in-heap types can be omitted.
    //
    // The last point is the real benefit of NotInHeap. The runtime uses
    // it for low-level internal structures to avoid memory barriers in the
    // scheduler and the memory allocator where they are illegal or simply
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 18:24:50 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/util/cache/expiring.go

    }
    
    func (c *Expiring) gc(now time.Time) {
    	for {
    		// Return from gc if the heap is empty or the next element is not yet
    		// expired.
    		//
    		// heap[0] is a peek at the next element in the heap, which is not obvious
    		// from looking at the (*expiringHeap).Pop() implementation below.
    		// heap.Pop() swaps the first entry with the last entry of the heap, then
    		// calls (*expiringHeap).Pop() which returns the last element.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 22 15:51:23 UTC 2023
    - 5.6K bytes
    - Viewed (0)
Back to top