getRSS:获取进程常驻集大小(物理内存使用)

时间:2021-05-18 05:02:46
【文件属性】:
文件名称:getRSS:获取进程常驻集大小(物理内存使用)
文件大小:2KB
文件格式:ZIP
更新时间:2021-05-18 05:02:46
C getRSS 这段代码是的备份,其链接现在已断开。 该文件提供2 API: /* get the current resident set size, in bytes, of the current process */ size_t currentSize = getCurrentRSS( ); /* get the peak resident set size, in bytes, of the current process */ size_t peakSize = getPeakRSS( ); 如果在Winodows上使用它,则应将其与psapi.lib链接。 您还应注意的另一件事是GetProcessMemoryInfo和getrusage ,代码不检查返回值。 因此,如果您使用它,我认为检查返回值是一个好习惯。
【文件预览】:
getRSS-master
----getRSS.c(4KB)
----README.md(661B)

网友评论