Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 236 for heapUp (0.14 sec)

  1. test/escape_array.go

    	return foo(foo(bar(a, b)))
    }
    
    func tbff1() *string {
    	a := "cat"
    	b := "dog" // ERROR "moved to heap: b$"
    	u := bff(&a, &b)
    	_ = u[0]
    	return &b
    }
    
    // BAD: need fine-grained analysis to track u[0] and u[1] differently.
    func tbff2() *string {
    	a := "cat" // ERROR "moved to heap: a$"
    	b := "dog" // ERROR "moved to heap: b$"
    	u := bff(&a, &b)
    	_ = u[0]
    	return u[1]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  2. test/escape4.go

    		p = alloc(3) // ERROR "inlining call to alloc" "moved to heap: x"
    	}
    	f()
    }
    
    func f2() {} // ERROR "can inline f2"
    
    // No inline for recover; panic now allowed to inline.
    func f3() { panic(1) } // ERROR "can inline f3" "1 escapes to heap"
    func f4() { recover() }
    
    func f5() *byte { // ERROR "can inline f5"
    	type T struct {
    		x [1]byte
    	}
    	t := new(T) // ERROR "new.T. escapes to heap"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 19:43:26 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  3. pkg/test/loadbalancersim/timer/queue.go

    			}
    		}
    	}()
    
    	return q
    }
    
    func (q *Queue) Len() int {
    	q.mutex.Lock()
    	defer q.mutex.Unlock()
    	return q.heap.Len()
    }
    
    func (q *Queue) Schedule(handler func(), deadline time.Time) {
    	// Add the timer to the heap.
    	q.mutex.Lock()
    	heap.Push(&q.heap, &entry{
    		handler:  handler,
    		deadline: deadline,
    		index:    0,
    	})
    	q.mutex.Unlock()
    
    	// Request that the timer be reset.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 19:13:32 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/outbuf.go

    		// The heap variables aren't protected by a mutex. For now, just bomb if you
    		// try to use OutBuf in parallel. (Note this probably could be fixed.)
    		if out.isView {
    			panic("cannot write to heap in parallel")
    		}
    		// See if our heap would grow to be too large, and if so, copy it to the end
    		// of the mmapped area.
    		if heapLen > maxOutBufHeapLen && out.copyHeap() {
    			heapPos -= heapLen
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/outbuf_mmap.go

    	if err != nil {
    		return err
    	}
    
    	// copy heap to new mapping
    	if uint64(oldlen+len(out.heap)) > filesize {
    		panic("mmap size too small")
    	}
    	copy(out.buf[oldlen:], out.heap)
    	out.heap = out.heap[:0]
    	return nil
    }
    
    func (out *OutBuf) munmap() {
    	if out.buf == nil {
    		return
    	}
    	syscall.Munmap(out.buf)
    	out.buf = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  6. test/fixedbugs/issue27557.go

    func f1() {
    	var t T
    	f := t.noescape // ERROR "t.noescape does not escape"
    	f()
    }
    
    func f2() {
    	var t T       // ERROR "moved to heap"
    	f := t.escape // ERROR "t.escape does not escape"
    	f()
    }
    
    func f3() {
    	var t T        // ERROR "moved to heap"
    	f := t.returns // ERROR "t.returns does not escape"
    	sink = f()
    }
    
    type T struct{}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:41:07 UTC 2021
    - 949 bytes
    - Viewed (0)
  7. pkg/test/loadbalancersim/loadbalancer/edf.go

    func (pq priorityQueue) Less(i, j int) bool {
    	// Flip logic to make this a min queue.
    	if pq[i].deadline == pq[j].deadline {
    		return pq[i].index < pq[j].index
    	}
    	return pq[i].deadline < pq[j].deadline
    }
    
    // Swap implements heap.Interface/sort.Interface
    func (pq priorityQueue) Swap(i, j int) {
    	pq[i], pq[j] = pq[j], pq[i]
    }
    
    // Push implements heap.Interface for pushing an item into the heap
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 19:13:32 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  8. src/runtime/traceexp.go

    	// Experimental heap span events. IDs map reversibly to base addresses.
    	traceEvSpan      // heap span exists [timestamp, id, npages, type/class]
    	traceEvSpanAlloc // heap span alloc [timestamp, id, npages, type/class]
    	traceEvSpanFree  // heap span free [timestamp, id]
    
    	// Experimental heap object events. IDs map reversibly to addresses.
    	traceEvHeapObject      // heap object exists [timestamp, id, type]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/outbuf_nommap.go

    package ld
    
    // Mmap allocates an in-heap output buffer with the given size. It copies
    // any old data (if any) to the new buffer.
    func (out *OutBuf) Mmap(filesize uint64) error {
    	// We need space to put all the symbols before we apply relocations.
    	oldheap := out.heap
    	if filesize < uint64(len(oldheap)) {
    		panic("mmap size too small")
    	}
    	out.heap = make([]byte, filesize)
    	copy(out.heap, oldheap)
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:20:31 UTC 2024
    - 660 bytes
    - Viewed (0)
  10. test/stackobj.go

    type StkObj struct {
    	h *HeapObj
    }
    
    var n int
    var c int = -1
    
    func gc() {
    	// encourage heap object to be collected, and have its finalizer run.
    	runtime.GC()
    	runtime.GC()
    	runtime.GC()
    	n++
    }
    
    func main() {
    	f()
    	gc() // prior to stack objects, heap object is not collected until here
    	if c < 0 {
    		panic("heap object never collected")
    	}
    	if c != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 03 19:54:16 UTC 2018
    - 975 bytes
    - Viewed (0)
Back to top