mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
go vendor; track uptime, health
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// +build go1.3
|
||||
|
||||
package stack
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
var pcStackPool = sync.Pool{
|
||||
New: func() interface{} { return make([]uintptr, 1000) },
|
||||
}
|
||||
|
||||
func poolBuf() []uintptr {
|
||||
return pcStackPool.Get().([]uintptr)
|
||||
}
|
||||
|
||||
func putPoolBuf(p []uintptr) {
|
||||
pcStackPool.Put(p)
|
||||
}
|
||||
Reference in New Issue
Block a user