Issue: #96 - Garbage collect inodeproc once every 50 ui refresh as default.

- Reduce default frequency to avoid performance issue.
- The frequency of it can be modified with `-g` option
  and can be disabled with `-g 0`.
This commit is contained in:
Kondo Takeo
2021-02-17 23:02:27 +09:00
parent 12dbf5e28a
commit b97fb4cfdf
3 changed files with 20 additions and 3 deletions

View File

@@ -235,7 +235,8 @@ static quad_t get_ms() {
static void get_pids(std::set<pid_t> *pids) {
DIR *proc = opendir("/proc");
if (proc == 0) {
std::cerr << "Error reading /proc, needed to get inode-to-pid-mapping" << std::endl;
std::cerr << "Error reading /proc, needed to get inode-to-pid-mapping"
<< std::endl;
exit(1);
}
dirent *entry;