Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 553 for mheap (0.15 sec)

  1. src/runtime/mgcpacer_test.go

    			},
    		},
    		{
    			// The most basic test case with a memory limit: a steady-state heap.
    			// Growth to an O(MiB) heap, then constant heap size, alloc/scan rates.
    			// Provide a lot of room for the limit. Essentially, this should behave just like
    			// the "Steady" test. Note that we don't simulate non-heap overheads, so the
    			// memory limit and the heap limit are identical.
    			name:          "SteadyMemoryLimit",
    			gcPercent:     100,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 13:53:21 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. src/runtime/time.go

    	}
    	if heap[i].timer != tw.timer {
    		heap[i] = tw
    	}
    }
    
    // siftDown puts the timer at position i in the right place
    // in the heap by moving it down toward the bottom of the heap.
    func (ts *timers) siftDown(i int) {
    	heap := ts.heap
    	n := len(heap)
    	if i >= n {
    		badTimer()
    	}
    	if i*timerHeapN+1 >= n {
    		return
    	}
    	tw := heap[i]
    	when := tw.when
    	if when <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top