我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

go工具pprof -inuse_space比linux顶部显示的小得多

My program runs in background. I use linux top command, it shows 16g memory. But when I want to use go pprof -inuse_space to check the point, I gives only 200M. Where do the other memory go?

Generally, the memory used in os(shown by top VIRT) is larger than pprof. One reason is gc will happen when heap size > ($GOGC% + 1) * (reachable nodes size): https://blog.golang.org/go15gc. By default, $GOGC is 100, that means the memory size will be twice of the heap size shown by pprof. But you seem not to be in this case.

近期文章

  • 如何阻止重复进程?
  • 银杏到cobertura和JUnit
  • golang网络服务器接受cookie,尽管它们已经过期
  • 将grpc客户端包装在cobra命令后面的正确方法是什么?
  • 如何在golang编译时不知道protobuf3消息类型的情况下解析它?
  • 在Golang中创建FILE_ID_DESCRIPTOR
  • 如何在GoLang中使用GOB编码序列化嵌套结构?
  • 捕获exec.Command的缓冲stdout输出
  • PHP客户端和Golang服务器中的Apache Thrift错误
  • 配置结构接收器以使用某种类型
  • 任何人都可以帮我解决这个GoLand终端错误
  • 公开所有注册的RPC方法和签名
  • golang http.Post请求返回响应404
  • 去rpc内存泄漏还是缺乏了解?
  • golang.org/x/net/html-节点的令牌类型
  • Golang的引用类型
  • 使用Golang通过G Suite发送电子邮件
  • Hugo不在子目录中显示我的文件
  • 为什么有时我会从AWS得到错误答案?
  • 如何导入其他项目的子模块

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华