16.0 EiB memory usage in the process list on FreeBSD
@lantw
Submitted by Ting-Wei Lan Link to original bug (#744890)
Description
Created attachment 297495 Screenshot of gnome-system-monitor on FreeBSD
Please see the attached screenshot. Memory usage of some processes is 16 EiB.
It seems the odd value comes from function get_process_memory_info in src/proctable.cpp:
info->mem = info->memres - info->memshared;
If the value of resident memory is smaller than the value of shared memory, it will cause the memory usage becomes negative, which is incorrect.
The value of resident memory is directly provided by the kernel. It is the same as the RSS field of the output of ps command.
The value of shared memory is calculated from the virtual memory map. It scans the map, find entries with vnode object type, and return the sum of size of mapped files.
Is this a problem of gnome-system-monitor or libgtop?
Attachment 297495, "Screenshot of gnome-system-monitor on FreeBSD":