linkwallet/meta/meta.go

15 lines
197 B
Go

package meta
import (
"fmt"
"runtime"
)
func MemInfo() string {
stats := runtime.MemStats{}
runtime.ReadMemStats(&stats)
return fmt.Sprintf("%.1fMb", float64(stats.Alloc)/1024.0/1024.0)
}