golang 创建超过10万个Go程时报错stackcacherefill

前端之家收集整理的这篇文章主要介绍了golang 创建超过10万个Go程时报错stackcacherefill前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
packagemain

import(
//"fmt"
"time"
)
varc=make(chanint,100)

funcgofunc(){
time.Sleep(0)
c<-0
}
funcmain(){
fori:=0;i<10;i++{
forj:=0;j<10000;j++{
gogofunc()
}
time.Sleep(time.Second)
}
}


fatal error: out of memory (stackcacherefill)@H_301_11@


runtime stack:@H_301_11@

runtime.throw(0x45f820)@H_301_11@

c:/go/src/pkg/runtime/panic.c:520 +0x71@H_301_11@

stackcacherefill()@H_301_11@

c:/go/src/pkg/runtime/stack.c:52 +0x87@H_301_11@

runtime.stackalloc(0x12219360,0x4000)@H_301_11@

c:/go/src/pkg/runtime/stack.c:124 +0x154@H_301_11@

mstackalloc(0x11514000)@H_301_11@

c:/go/src/pkg/runtime/proc.c:1754 +0x43@H_301_11@

runtime.mcall(0x423794)@H_301_11@

c:/go/src/pkg/runtime/asm_386.s:190 +0x40@H_301_11@

原文链接:https://www.f2er.com/go/190770.html

猜你在找的Go相关文章