Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 236 for heapUp (0.12 sec)

  1. 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)
  2. 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)
  3. testing/internal-performance-testing/src/templates/root-project/pom.xml

                                    def heap = ManagementFactory.memoryMXBean.heapMemoryUsage
                                    def nonHeap = ManagementFactory.memoryMXBean.nonHeapMemoryUsage
                                    println "BEFORE GC"
                                    println "heap: \${format(heap.used)} (initial \${format(heap.init)}, committed \${format(heap.committed)}, max \${format(heap.max)}"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. test/escape_struct_param1.go

    func tUPiSPa() {
    	s1 := "ant"
    	s2 := "bat" // ERROR "moved to heap: s2$"
    	s3 := "cat" // ERROR "moved to heap: s3$"
    	s4 := "dog" // ERROR "moved to heap: s4$"
    	s5 := "emu" // ERROR "moved to heap: s5$"
    	s6 := "fox" // ERROR "moved to heap: s6$"
    	ps2 := &s2
    	ps4 := &s4 // ERROR "moved to heap: ps4$"
    	ps6 := &s6 // ERROR "moved to heap: ps6$"
    	u1 := U{&s1, &ps2}
    	u2 := &U{&s3, &ps4}  // ERROR "&U{...} does not escape$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 8.9K bytes
    - Viewed (0)
  5. test/escape_struct_param2.go

    func tUPiSPa() {
    	s1 := "ant"
    	s2 := "bat" // ERROR "moved to heap: s2$"
    	s3 := "cat" // ERROR "moved to heap: s3$"
    	s4 := "dog" // ERROR "moved to heap: s4$"
    	s5 := "emu" // ERROR "moved to heap: s5$"
    	s6 := "fox" // ERROR "moved to heap: s6$"
    	ps2 := &s2
    	ps4 := &s4 // ERROR "moved to heap: ps4$"
    	ps6 := &s6 // ERROR "moved to heap: ps6$"
    	u1 := U{&s1, &ps2}
    	u2 := &U{&s3, &ps4}  // ERROR "&U{...} does not escape$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 8.9K bytes
    - Viewed (0)
  6. test/escape_level.go

    var sink interface{}
    
    func level0() {
    	i := 0     // ERROR "moved to heap: i"
    	p0 := &i   // ERROR "moved to heap: p0"
    	p1 := &p0  // ERROR "moved to heap: p1"
    	p2 := &p1  // ERROR "moved to heap: p2"
    	sink = &p2
    }
    
    func level1() {
    	i := 0    // ERROR "moved to heap: i"
    	p0 := &i  // ERROR "moved to heap: p0"
    	p1 := &p0 // ERROR "moved to heap: p1"
    	p2 := &p1
    	sink = p2
    }
    
    func level2() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 03 17:52:06 UTC 2019
    - 1.8K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/heap_test.go

    			}
    			h.pop()
    			if !verify(&h, 0) {
    				t.Errorf("heap invariant violated: %v", h)
    			}
    		}
    		for !h.empty() { // pop remaining elements
    			h.pop()
    			if !verify(&h, 0) {
    				t.Errorf("heap invariant violated: %v", h)
    			}
    		}
    	}
    }
    
    // recursively verify heap-ness, starting at element i.
    func verify(h *heap, i int) bool {
    	n := len(*h)
    	c1 := 2*i + 1 // left child
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 04 19:13:42 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  8. test/escape_map.go

    	i := 0                   // ERROR "moved to heap: i"
    	j := 0                   // ERROR "moved to heap: j"
    	m[&i] = &j
    	return m
    }
    
    func map3() []*int {
    	m := make(map[*int]*int) // ERROR "make\(map\[\*int\]\*int\) does not escape"
    	i := 0                   // ERROR "moved to heap: i"
    	// BAD: j should not escape
    	j := 0 // ERROR "moved to heap: j"
    	m[&i] = &j
    	var r []*int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  9. test/escape_param.go

    	p := &i // ERROR "moved to heap: p$"
    	p2 := &p
    	param6(&p2)
    }
    
    // **in -> heap
    func param7(i ***int) { // ERROR "leaking param content: i$"
    	sink = **i
    }
    
    func caller7() {
    	i := 0 // ERROR "moved to heap: i$"
    	p := &i
    	p2 := &p
    	param7(&p2)
    }
    
    // **in -> heap
    func param8(i **int) { // ERROR "i does not escape$"
    	sink = **i // ERROR "\*\(\*i\) escapes to heap"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 8.9K bytes
    - Viewed (0)
  10. test/escape_field.go

    	x X
    }
    
    func field0() {
    	i := 0 // ERROR "moved to heap: i$"
    	var x X
    	x.p1 = &i
    	sink = x.p1
    }
    
    func field1() {
    	i := 0 // ERROR "moved to heap: i$"
    	var x X
    	// BAD: &i should not escape
    	x.p1 = &i
    	sink = x.p2
    }
    
    func field3() {
    	i := 0 // ERROR "moved to heap: i$"
    	var x X
    	x.p1 = &i
    	sink = x // ERROR "x escapes to heap"
    }
    
    func field4() {
    	i := 0 // ERROR "moved to heap: i$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 12 08:31:49 UTC 2020
    - 2.9K bytes
    - Viewed (0)
Back to top