Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 161 for heapUp (0.14 sec)

  1. src/internal/trace/internal/oldtrace/order.go

    }
    
    func (h *orderEventList) Push(x orderEvent) {
    	*h = append(*h, x)
    	heapUp(h, len(*h)-1)
    }
    
    func (h *orderEventList) Pop() orderEvent {
    	n := len(*h) - 1
    	(*h)[0], (*h)[n] = (*h)[n], (*h)[0]
    	heapDown(h, 0, n)
    	x := (*h)[len(*h)-1]
    	*h = (*h)[:len(*h)-1]
    	return x
    }
    
    func heapUp(h *orderEventList, j int) {
    	for {
    		i := (j - 1) / 2 // parent
    		if i == j || !h.Less(j, i) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. src/container/heap/heap.go

    // Package heap provides heap operations for any type that implements
    // heap.Interface. A heap is a tree with the property that each node is the
    // minimum-valued node in its subtree.
    //
    // The minimum element in the tree is the root, at index 0.
    //
    // A heap is a common way to implement a priority queue. To build a priority
    // queue, implement the Heap interface with the (negative) priority as the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:10 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/heap.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package ld
    
    import "cmd/link/internal/loader"
    
    // Min-heap implementation, for the deadcode pass.
    // Specialized for loader.Sym elements.
    
    type heap []loader.Sym
    
    func (h *heap) push(s loader.Sym) {
    	*h = append(*h, s)
    	// sift up
    	n := len(*h) - 1
    	for n > 0 {
    		p := (n - 1) / 2 // parent
    		if (*h)[p] <= (*h)[n] {
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:55:22 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  4. src/cmd/vendor/github.com/google/pprof/profile/legacy_java_profile.go

    		PeriodType: &ValueType{},
    	}
    	header := string(bytes.TrimSpace(h[0]))
    
    	var err error
    	var pType string
    	switch header {
    	case "--- heapz 1 ---":
    		pType = "heap"
    	case "--- contentionz 1 ---":
    		pType = "contention"
    	default:
    		return nil, errUnrecognized
    	}
    
    	if b, err = parseJavaHeader(pType, h[1], p); err != nil {
    		return nil, err
    	}
    	var locs map[uint64]*Location
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  5. testing/soak/src/integTest/kotlin/org/gradle/kotlin/dsl/caching/AbstractScriptCachingIntegrationTest.kt

            executerForCacheInspection(*arguments).run()
    
        protected
        fun buildWithDaemonHeapSize(heapMb: Int, vararg arguments: String): ExecutionResult =
            executerForCacheInspection(*arguments)
                .withBuildJvmOpts("-Xms${heapMb}m", "-Xmx${heapMb}m")
                .run()
    
        private
        fun executerForCacheInspection(vararg arguments: String): GradleExecuter =
            gradleExecuterFor(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 11:33:23 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top