mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-26 05:27:19 +00:00
a8ce14e8cc
* save * save * save * save
22 lines
241 B
Go
22 lines
241 B
Go
package common
|
|
|
|
import (
|
|
"os"
|
|
"runtime"
|
|
)
|
|
|
|
var doMemstat = true
|
|
|
|
func init() {
|
|
_, ok := os.LookupEnv("NO_MEMSTAT")
|
|
if ok {
|
|
doMemstat = false
|
|
}
|
|
}
|
|
|
|
func ReadMemStats(m *runtime.MemStats) {
|
|
if doMemstat {
|
|
runtime.ReadMemStats(m)
|
|
}
|
|
}
|