Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for setMemoryLimit (0.4 sec)

  1. src/runtime/debug/garbage.go

    // two: KiB means 2^10 bytes, MiB means 2^20 bytes, and so on.
    //
    // SetMemoryLimit returns the previously set memory limit.
    // A negative input does not adjust the limit, and allows for
    // retrieval of the currently set memory limit.
    func SetMemoryLimit(limit int64) int64 {
    	return setMemoryLimit(limit)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. cmd/server-rlimit.go

    			humanize.IBytes(vssLimit))
    	}
    
    	if ctx.MemLimit > 0 {
    		maxLimit = ctx.MemLimit
    	}
    
    	if maxLimit > 0 {
    		debug.SetMemoryLimit(int64(maxLimit))
    	}
    
    	// Do not use RLIMIT_AS as that is not useful and at times on systems < 4Gi
    	// this can crash the Go runtime if the value is smaller refer
    	// - https://github.com/golang/go/issues/38010
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 11:58:12 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. src/runtime/mgcpacer.go

    	if in >= 0 {
    		c.memoryLimit.Store(in)
    	}
    
    	return out
    }
    
    //go:linkname setMemoryLimit runtime/debug.setMemoryLimit
    func setMemoryLimit(in int64) (out int64) {
    	// Run on the system stack since we grab the heap lock.
    	systemstack(func() {
    		lock(&mheap_.lock)
    		out = gcController.setMemoryLimit(in)
    		if in < 0 || out == in {
    			// If we're just checking the value or not changing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 55.4K bytes
    - Viewed (0)
  4. src/runtime/metrics/description.go

    	{
    		Name: "/gc/gomemlimit:bytes",
    		Description: "Go runtime memory limit configured by the user, otherwise " +
    			"math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and " +
    			"the runtime/debug.SetMemoryLimit function.",
    		Kind: KindUint64,
    	},
    	{
    		Name: "/gc/heap/allocs-by-size:bytes",
    		Description: "Distribution of heap allocations by approximate size. " +
    			"Bucket counts increase monotonically. " +
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 06 17:59:12 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  5. src/runtime/metrics/doc.go

    	/gc/gomemlimit:bytes
    		Go runtime memory limit configured by the user, otherwise
    		math.MaxInt64. This value is set by the GOMEMLIMIT environment
    		variable, and the runtime/debug.SetMemoryLimit function.
    
    	/gc/heap/allocs-by-size:bytes
    		Distribution of heap allocations by approximate size.
    		Bucket counts increase monotonically. Note that this does not
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:58:43 UTC 2024
    - 20K bytes
    - Viewed (0)
  6. src/runtime/extern.go

    they are based on powers of two: KiB means 2^10 bytes, MiB means 2^20 bytes,
    and so on. The default setting is [math.MaxInt64], which effectively disables the
    memory limit. [runtime/debug.SetMemoryLimit] allows changing this limit at run
    time.
    
    The GODEBUG variable controls debugging variables within the runtime.
    It is a comma-separated list of name=val pairs setting these named variables:
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  7. src/runtime/metrics_test.go

    	// Run a GC cycle to get some of the stats to be non-zero.
    	runtime.GC()
    
    	// Set an arbitrary memory limit to check the metric for it
    	limit := int64(512 * 1024 * 1024)
    	oldLimit := debug.SetMemoryLimit(limit)
    	defer debug.SetMemoryLimit(oldLimit)
    
    	// Set a GC percent to check the metric for it
    	gcPercent := 99
    	oldGCPercent := debug.SetGCPercent(gcPercent)
    	defer debug.SetGCPercent(oldGCPercent)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"PrintStack", Func, 0},
    		{"ReadBuildInfo", Func, 12},
    		{"ReadGCStats", Func, 1},
    		{"SetGCPercent", Func, 1},
    		{"SetMaxStack", Func, 2},
    		{"SetMaxThreads", Func, 2},
    		{"SetMemoryLimit", Func, 19},
    		{"SetPanicOnFault", Func, 3},
    		{"SetTraceback", Func, 6},
    		{"Stack", Func, 0},
    		{"WriteHeapDump", Func, 3},
    	},
    	"runtime/metrics": {
    		{"(Value).Float64", Method, 16},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top