Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 24 for memState (0.3 sec)

  1. src/runtime/align_runtime_test.go

    var AtomicVariables = []unsafe.Pointer{
    	unsafe.Pointer(&ncgocall),
    	unsafe.Pointer(&test_z64),
    	unsafe.Pointer(&blockprofilerate),
    	unsafe.Pointer(&mutexprofilerate),
    	unsafe.Pointer(&gcController),
    	unsafe.Pointer(&memstats),
    	unsafe.Pointer(&sched),
    	unsafe.Pointer(&ticks),
    	unsafe.Pointer(&work),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. test/fixedbugs/issue15277.go

    		println("second alloc: expected delta at least 9MB, got: ", delta)
    	}
    	runtime.KeepAlive(x)
    }
    
    func main() {
    	x := inuse()
    	f(new(big), x)
    }
    
    func inuse() int64 {
    	runtime.GC()
    	var st runtime.MemStats
    	runtime.ReadMemStats(&st)
    	return int64(st.Alloc)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 851 bytes
    - Viewed (0)
  3. src/runtime/debug/garbage_test.go

    import (
    	"internal/testenv"
    	"os"
    	"runtime"
    	. "runtime/debug"
    	"testing"
    	"time"
    )
    
    func TestReadGCStats(t *testing.T) {
    	defer SetGCPercent(SetGCPercent(-1))
    
    	var stats GCStats
    	var mstats runtime.MemStats
    	var min, max time.Duration
    
    	// First ReadGCStats will allocate, second should not,
    	// especially if we follow up with an explicit garbage collection.
    	stats.PauseQuantiles = make([]time.Duration, 10)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 19 14:30:00 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  4. pkg/ctrlz/home.go

    }
    
    type homeInfo struct {
    	ProcessName string
    	HeapSize    uint64
    	NumGC       uint32
    	CurrentTime int64
    	Hostname    string
    	IP          string
    }
    
    func getHomeInfo() *homeInfo {
    	var ms runtime.MemStats
    	runtime.ReadMemStats(&ms)
    
    	hostName, _ := os.Hostname()
    
    	return &homeInfo{
    		ProcessName: os.Args[0],
    		HeapSize:    ms.HeapAlloc,
    		NumGC:       ms.NumGC,
    		CurrentTime: time.Now().UnixNano(),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. test/fixedbugs/issue9110.go

    import (
    	"runtime"
    	"runtime/debug"
    	"sync"
    	"time"
    )
    
    func main() {
    	runtime.GOMAXPROCS(1)
    	debug.SetGCPercent(1000000) // only GC when we ask for GC
    
    	var stats, stats1, stats2 runtime.MemStats
    
    	release := func() {}
    	for i := 0; i < 20; i++ {
    		if i == 10 {
    			// Should be warmed up by now.
    			runtime.ReadMemStats(&stats1)
    		}
    
    		c := make(chan int)
    		for i := 0; i < 10; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1.7K bytes
    - Viewed (0)
  6. test/fixedbugs/issue15281.go

    		if delta := inuse() - start; delta > 1<<20 {
    			println("BUG: f2: after alloc: expected delta below 1MB, got: ", delta)
    			println(x)
    		}
    	}
    }
    
    func inuse() int64 {
    	runtime.GC()
    	var st runtime.MemStats
    	runtime.ReadMemStats(&st)
    	return int64(st.Alloc)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 17 09:45:44 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  7. src/runtime/testdata/testprogcgo/cgonoescape.go

    //go:noinline
    func withoutNoEscape() {
    	var str string
    	C.runCWithoutNoEscape(unsafe.Pointer(&str))
    }
    
    func CgoNoEscape() {
    	// make GC stop to see the heap objects allocated
    	debug.SetGCPercent(-1)
    
    	var stats runtime.MemStats
    	runtime.ReadMemStats(&stats)
    	preHeapObjects := stats.HeapObjects
    
    	for i := 0; i < num; i++ {
    		withNoEscape()
    	}
    
    	runtime.ReadMemStats(&stats)
    	nowHeapObjects := stats.HeapObjects
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 16:43:23 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  8. pkg/ctrlz/topics/assets/templates/mem.html

    {{ define "content" }}
    
    <p>
        This information is gathered from the Go runtime and represents the ongoing memory consumption
        of this process. Please refer to the <a href="https://golang.org/pkg/runtime/#MemStats">Go documentation on the MemStats type</a>
        for more information about all of these values.
    </p>
    
    <table>
        <thead>
        <tr>
            <th>Counter</th>
            <th>Value</th>
            <th>Description</th>
        </tr>
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  9. src/cmd/link/internal/benchmark/bench.go

    )
    
    type Metrics struct {
    	gc        Flags
    	marks     []*mark
    	curMark   *mark
    	filebase  string
    	pprofFile *os.File
    }
    
    type mark struct {
    	name              string
    	startM, endM, gcM runtime.MemStats
    	startT, endT      time.Time
    }
    
    // New creates a new Metrics object.
    //
    // Typical usage should look like:
    //
    //	func main() {
    //	  filename := "" // Set to enable per-phase pprof file output.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 30 18:10:36 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  10. src/runtime/mcheckmark.go

    		arena := mheap_.arenas[ai.l1()][ai.l2()]
    		bitmap := arena.checkmarks
    
    		if bitmap == nil {
    			// Allocate bitmap on first use.
    			bitmap = (*checkmarksMap)(persistentalloc(unsafe.Sizeof(*bitmap), 0, &memstats.gcMiscSys))
    			if bitmap == nil {
    				throw("out of memory allocating checkmarks bitmap")
    			}
    			arena.checkmarks = bitmap
    		} else {
    			// Otherwise clear the existing bitmap.
    			clear(bitmap.b[:])
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.8K bytes
    - Viewed (0)
Back to top