Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for setMaxStack (0.21 sec)

  1. src/runtime/rdebug.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime
    
    import _ "unsafe" // for go:linkname
    
    //go:linkname setMaxStack runtime/debug.setMaxStack
    func setMaxStack(in int) (out int) {
    	out = int(maxstacksize)
    	maxstacksize = uintptr(in)
    	return out
    }
    
    //go:linkname setPanicOnFault runtime/debug.setPanicOnFault
    func setPanicOnFault(new bool) (old bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 02 18:52:03 UTC 2022
    - 550 bytes
    - Viewed (0)
  2. src/runtime/debug/stubs.go

    // license that can be found in the LICENSE file.
    
    package debug
    
    import (
    	"time"
    )
    
    // 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)
  3. test/fixedbugs/issue18636.go

    package main
    
    import "runtime/debug"
    
    type Foo struct {
    	A [1 << 20]byte
    	B string
    }
    
    func run(c chan bool) {
    	f := new(Foo)
    	*f = Foo{B: "hello"}
    	c <- true
    }
    
    func main() {
    	debug.SetMaxStack(1 << 16)
    	c := make(chan bool)
    	go run(c)
    	<-c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 21:33:05 UTC 2017
    - 411 bytes
    - Viewed (0)
  4. src/runtime/debug/garbage.go

    // of the value provided to SetMaxStack.
    //
    // SetMaxStack is useful mainly for limiting the damage done by
    // goroutines that enter an infinite recursion. It only limits future
    // stack growth.
    func SetMaxStack(bytes int) int {
    	return setMaxStack(bytes)
    }
    
    // SetMaxThreads sets the maximum number of operating system
    // threads that the Go program can use. If it attempts to use more than
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. src/runtime/testdata/testprog/deadlock.go

    		}
    	}
    
    	go F()
    	go F()
    	runtime.Goexit()
    }
    
    func StackOverflow() {
    	var f func() byte
    	f = func() byte {
    		var buf [64 << 10]byte
    		return buf[0] + f()
    	}
    	debug.SetMaxStack(1474560)
    	f()
    }
    
    func ThreadExhaustion() {
    	debug.SetMaxThreads(10)
    	c := make(chan int)
    	for i := 0; i < 100; i++ {
    		go func() {
    			runtime.LockOSThread()
    			c <- 0
    			select {}
    		}()
    		<-c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 27 20:44:24 UTC 2021
    - 6.5K bytes
    - Viewed (0)
  6. src/compress/flate/deflate_test.go

    	}
    }
    
    func TestMaxStackSize(t *testing.T) {
    	// This test must not run in parallel with other tests as debug.SetMaxStack
    	// affects all goroutines.
    	n := debug.SetMaxStack(1 << 16)
    	defer debug.SetMaxStack(n)
    
    	var wg sync.WaitGroup
    	defer wg.Wait()
    
    	b := make([]byte, 1<<20)
    	for level := HuffmanOnly; level <= BestCompression; level++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  7. src/path/filepath/path_windows_test.go

    		}
    	}
    }
    
    func TestUNC(t *testing.T) {
    	// Test that this doesn't go into an infinite recursion.
    	// See golang.org/issue/15879.
    	defer debug.SetMaxStack(debug.SetMaxStack(1e6))
    	filepath.Glob(`\\?\c:\*`)
    }
    
    func testWalkMklink(t *testing.T, linktype string) {
    	output, _ := exec.Command("cmd", "/c", "mklink", "/?").Output()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 20:38:54 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  8. src/runtime/proc.go

    	if goarch.PtrSize == 8 {
    		maxstacksize = 1000000000
    	} else {
    		maxstacksize = 250000000
    	}
    
    	// An upper limit for max stack size. Used to avoid random crashes
    	// after calling SetMaxStack and trying to allocate a stack that is too big,
    	// since stackalloc works with 32-bit sizes.
    	maxstackceiling = 2 * maxstacksize
    
    	// Allow newproc to start new Ms.
    	mainStarted = true
    
    	if haveSysmon {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Module.Version", Field, 12},
    		{"ParseBuildInfo", Func, 18},
    		{"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},
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  10. api/go1.2.txt

    pkg reflect, method (Value) SetCap(int)
    pkg reflect, method (Value) Slice3(int, int, int) Value
    pkg runtime, type MemStats struct, GCSys uint64
    pkg runtime, type MemStats struct, OtherSys uint64
    pkg runtime/debug, func SetMaxStack(int) int
    pkg runtime/debug, func SetMaxThreads(int) int
    pkg sort, func Stable(Interface)
    pkg strings, func IndexByte(string, uint8) int
    pkg sync/atomic, func SwapInt32(*int32, int32) int32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 18 04:36:59 UTC 2013
    - 1.9M bytes
    - Viewed (0)
Back to top