Apply .gitignore rules

This commit is contained in:
皮蛋13361098506
2025-01-06 16:21:36 +08:00
parent 1b77f62820
commit ccd2c530cf
580 changed files with 69806 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package runtimeUtil
import "runtime"
// 获取当前正在使用的内存大小,单位:字节数
// 具体参见文档:
// 1. http://blog.csdn.net/webxscan/article/details/72857292
// 2. https://studygolang.com/static/pkgdoc/pkg/runtime.htm#MemStats
// 返回值:
// int64:正在使用的内存大小
func GetMemSize() uint64 {
var memStat runtime.MemStats
runtime.ReadMemStats(&memStat)
return memStat.Alloc
}