golang之内存使用报告
来源:互联网 发布:数据有效性输入空格 编辑:程序博客网 时间:2024/04/29 21:26
golang之内存使用报告
golang 的 runtime包可以用来检测内存的使用情况,主要内存使用情况,都在MemStats结构体里面
type MemStats struct { // 常用数据 Alloc uint64 // 系统分配了,并且仍在使用的内存 TotalAlloc uint64 // 分配的内存总量 Sys uint64 // 从系统得到的内存总量 Lookups uint64 // 回环指针数量 Mallocs uint64 // 分配次数 Frees uint64 // 内存释放次数 // 主要的堆数据 HeapAlloc uint64 // 分配了之后,并且仍在使用的堆内存 HeapSys uint64 // 从系统申请的堆内存大小 HeapIdle uint64 // 闲置状态的的span HeapInuse uint64 // 非限制状体的span HeapIdle + HeapInuse = HeapSys HeapReleased uint64 // 从系统中释放的内存大小 HeapObjects uint64 // 一共分配的对象数量 //底层的固定分配数据 //按字节计算容量 //Sys is bytes obtained from system. StackInuse uint64 // 栈分配使用的内存 StackSys uint64 //系统帐使用的内存量 MSpanInuse uint64 // mspan结构 使用的量 MSpanSys uint64 MCacheInuse uint64 // mcache 结构使用的量 MCacheSys uint64 //系统mcache结构使用的量 BuckHashSys uint64 // profiling bucket hash table,系统hash表使用情况 GCSys uint64 // GC 的元数据 OtherSys uint64 // 其他的系统分配数据 // Garbage collector statistics. NextGC uint64 // 当 HeapAlloc 大于该值的时候,会进行垃圾回收 LastGC uint64 // 上一次垃圾回收的时间 PauseTotalNs uint64 PauseNs [256]uint64 // circular buffer of recent GC pause durations, most recent at [(NumGC+255)%256]
PauseEnd [256]uint64 // circular buffer of recent GC pause end times NumGC uint32 EnableGC bool DebugGC bool // Per-size allocation statistics. // 61 is NumSizeClasses in the C code. BySize [61]struct { Size uint32 Mallocs uint64 Frees uint64 }}
0 0
- golang之内存使用报告
- C语言之内存使用
- c语言之内存使用
- 水滴石穿C语言之内存使用
- 水滴石穿C语言之内存使用
- 水滴石穿C语言之内存使用 [转]
- 水滴石穿C语言之内存使用
- 水滴石穿C语言之内存使用
- 水滴石穿C语言之内存使用
- boost之内存池使用实例
- 水滴石穿C语言之内存使用(转载)
- C++对象模型之内存区的使用
- C++对象模型之内存区的使用
- 水滴石穿C语言之内存使用(转)
- GlusterFS之内存池(mem-pool)使用实例分析
- 【IOS之内存管理】什么时候应该使用retain
- Android Studio 插件之内存泄露检测LeakCanary使用
- android之内存泄漏检测和解决方法及LeakCanary使用
- android AsyncTask介绍
- iOS下的实际网络连接状态检测:RealReachability
- php中$_REQUEST、$_POST、$_GET的区别和联系小结
- 字符串转整数算法
- cocoapods添加第三方库使用 安装过程
- golang之内存使用报告
- iOS开发--@property各种属性的区别
- node
- Linux /dev 自动创建设备节点
- 13、发布项目到私服
- javascript Date()
- Go语言内存分配器的实现
- 3123: [Sdoi2013]森林 主席树+启发式合并+LCA
- spring-aop学习笔记