我使用命令procstat -r $(pidof myprocess)并得到以下输出..。
PID COMM RESOURCE VALUE
84867 myprocess user time 00:00:12.637834
84867 myprocess system time 00:00:06.671334
84867 myprocess maximum RSS 11400 KB
84867 myprocess integral shared memory 1931920 KB
84867 myprocess integral unshared data 28272 KB
84867 myprocess integral unshared stack 301568 KB
84867 myprocess page reclaims 653
84867 myprocess page faults 0
...我有点担心
84867 myprocess integral shared memory 1 931 920 KB
84867 myprocess integral unshared data 28 272 KB
84867 myprocess integral unshared stack 301 568 KBhtop给了我关于内存(VIRT等)的不错的价值。
我应该担心内存泄漏吗?
发布于 2020-08-06 16:57:13
这是一个很低的文档,我也很困惑。
integral shared memory、integral unshared data和integral unshared stack状态正在运行计数器,而不是当前的使用快照。它们无限期地增加是正常的。它们没有显示内存泄漏。
有关每个字段数据的准确描述,请参见http://www.khmere.com/freebsd_book/html/ch07.html。
发布于 2019-01-28 19:12:53
integral shared memory包含程序链接到的每个共享库的code和rodata段。这个将近2GB的数字很大,但如果它是一个像浏览器一样大的应用程序的话,那也就不足为奇了。非共享段是由程序分配的数据,包括来自共享库的r/w数据页,等等。如果这些数据没有上升到惊人的程度(或者更糟,没有限制),您可能还可以。
https://unix.stackexchange.com/questions/497108
复制相似问题