mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 04:04:35 +03:00
Enable OOM support unconditionally on Linux.
Read OOM data only if column is enabled. Make sort ordering more consistent. Closes #182.
This commit is contained in:
@ -422,8 +422,6 @@ static void LinuxProcessList_readVServerData(LinuxProcess* process, const char*
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OOM
|
||||
|
||||
static void LinuxProcessList_readOomData(LinuxProcess* process, const char* dirname, const char* name) {
|
||||
char filename[MAX_NAME+1];
|
||||
snprintf(filename, MAX_NAME, "%s/%s/oom_score", dirname, name);
|
||||
@ -441,8 +439,6 @@ static void LinuxProcessList_readOomData(LinuxProcess* process, const char* dirn
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static bool LinuxProcessList_readCmdlineFile(Process* process, const char* dirname, const char* name) {
|
||||
if (Process_isKernelThread(process))
|
||||
return true;
|
||||
@ -579,9 +575,8 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, const char*
|
||||
LinuxProcessList_readCGroupFile(lp, dirname, name);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OOM
|
||||
LinuxProcessList_readOomData(lp, dirname, name);
|
||||
#endif
|
||||
if (settings->flags & PROCESS_FLAG_LINUX_OOM)
|
||||
LinuxProcessList_readOomData(lp, dirname, name);
|
||||
|
||||
if (proc->state == 'Z') {
|
||||
free(proc->comm);
|
||||
|
Reference in New Issue
Block a user