当前位置: 技术问答>linux和unix
服务器程序, 使用"top -p PID"命令此进程的详细信息, 发现SIZE和RSS不断增大, 是否一定是内存泄露??
来源: 互联网 发布时间:2015-12-20
本文导语: 向大家请教: 我有一个服务器程序, 使用"top -p PID"命令此进程的详细信息, 发现SIZE和RSS不断增大, 是否一定是内存泄露?? top的man page对这两个字段说明如下: SIZE The size of the task's code plus data plus stack space, in...
向大家请教:
我有一个服务器程序, 使用"top -p PID"命令此进程的详细信息, 发现SIZE和RSS不断增大, 是否一定是内存泄露??
top的man page对这两个字段说明如下:
SIZE The size of the task's code plus data plus stack space, in kilobytes, is shown here.
RSS The total amount of physical memory used by the task, in kilobytes, is shown here. For ELF processes used library pages are counted here, for a.out processes not.
我有一个服务器程序, 使用"top -p PID"命令此进程的详细信息, 发现SIZE和RSS不断增大, 是否一定是内存泄露??
top的man page对这两个字段说明如下:
SIZE The size of the task's code plus data plus stack space, in kilobytes, is shown here.
RSS The total amount of physical memory used by the task, in kilobytes, is shown here. For ELF processes used library pages are counted here, for a.out processes not.
|
用free看看used memory是否一直在下降?
|
valgrind查看,这个工具非常好用
|
可以查看system monitor,如果你的程序那个进程的内存一直在增加的,没有回落过,那么可以确定你的程序应该存在内存泄漏,或者你可以让你的程序持续跑上几个小时,看看系统是不是变的很慢,键盘以及鼠标反映很慢,如果是,那么说明你的程序在不断的吃内存。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。