Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for setMemoryLimit (0.29 sec)

  1. src/runtime/testdata/testprog/gc.go

    	const myLimit = 256 << 20
    	if limit := debug.SetMemoryLimit(-1); limit != math.MaxInt64 {
    		print("expected MaxInt64 limit, got ", limit, " bytes instead\n")
    		return
    	}
    	if limit := debug.SetMemoryLimit(myLimit); limit != math.MaxInt64 {
    		print("expected MaxInt64 limit, got ", limit, " bytes instead\n")
    		return
    	}
    	if limit := debug.SetMemoryLimit(-1); limit != myLimit {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 12.1K bytes
    - Viewed (0)
  2. 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)
  3. src/runtime/debug/stubs.go

    // Implemented in package runtime.
    func readGCStats(*[]time.Duration)
    func freeOSMemory()
    func setMaxStack(int) int
    func setGCPercent(int32) int32
    func setPanicOnFault(bool) bool
    func setMaxThreads(int) int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 03 15:12:04 UTC 2022
    - 435 bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. api/go1.19.txt

    pkg os/exec, var ErrDot error #43724
    pkg regexp/syntax, const ErrNestingDepth = "expression nests too deeply" #51684
    pkg regexp/syntax, const ErrNestingDepth ErrorCode #51684
    pkg runtime/debug, func SetMemoryLimit(int64) int64 #48409
    pkg sort, func Find(int, func(int) int) (int, bool) #50340
    pkg sync/atomic, method (*Bool) CompareAndSwap(bool, bool) bool #50860
    pkg sync/atomic, method (*Bool) Load() bool #50860
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 02 16:29:41 UTC 2022
    - 17.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top