Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for setMaxStack (0.23 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/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)
Back to top