Apply patches by Matthias Lederhofer adding extra

memory status fields
This commit is contained in:
Hisham Muhammad 2007-04-05 20:13:32 +00:00
parent a227b20fef
commit f56c8014f7
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,11 @@
What's new in version 0.6.6
* Added display of DRS, DT, LRS and TRS
(thanks to Matthias Lederhofer)
* BUGFIX: LRS and DRS memory values were flipped
(thanks to Matthias Lederhofer)
* BUGFIX: Don't crash on very high UIDs
(thanks to Egmont Koblinger)
What's new in version 0.6.5 What's new in version 0.6.5

View File

@ -316,6 +316,10 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {
: attr; : attr;
break; break;
} }
case M_DRS: Process_printLargeNumber(this, str, this->m_drs * PAGE_SIZE); return;
case M_DT: Process_printLargeNumber(this, str, this->m_dt * PAGE_SIZE); return;
case M_LRS: Process_printLargeNumber(this, str, this->m_lrs * PAGE_SIZE); return;
case M_TRS: Process_printLargeNumber(this, str, this->m_trs * PAGE_SIZE); return;
case M_SIZE: Process_printLargeNumber(this, str, this->m_size * PAGE_SIZE); return; case M_SIZE: Process_printLargeNumber(this, str, this->m_size * PAGE_SIZE); return;
case M_RESIDENT: Process_printLargeNumber(this, str, this->m_resident * PAGE_SIZE); return; case M_RESIDENT: Process_printLargeNumber(this, str, this->m_resident * PAGE_SIZE); return;
case M_SHARE: Process_printLargeNumber(this, str, this->m_share * PAGE_SIZE); return; case M_SHARE: Process_printLargeNumber(this, str, this->m_share * PAGE_SIZE); return;
@ -391,6 +395,14 @@ int Process_compare(const void* v1, const void* v2) {
return (p1->state - p2->state); return (p1->state - p2->state);
case NICE: case NICE:
return (p1->nice - p2->nice); return (p1->nice - p2->nice);
case M_DRS:
return (p2->m_drs - p1->m_drs);
case M_DT:
return (p2->m_dt - p1->m_dt);
case M_LRS:
return (p2->m_lrs - p1->m_lrs);
case M_TRS:
return (p2->m_trs - p1->m_trs);
case M_SIZE: case M_SIZE:
return (p2->m_size - p1->m_size); return (p2->m_size - p1->m_size);
case M_RESIDENT: case M_RESIDENT:
@ -427,6 +439,10 @@ char* Process_printField(ProcessField field) {
case STATE: return "S "; case STATE: return "S ";
case PRIORITY: return "PRI "; case PRIORITY: return "PRI ";
case NICE: return " NI "; case NICE: return " NI ";
case M_DRS: return " DATA ";
case M_DT: return " DIRTY ";
case M_LRS: return " LIB ";
case M_TRS: return " CODE ";
case M_SIZE: return " VIRT "; case M_SIZE: return " VIRT ";
case M_RESIDENT: return " RES "; case M_RESIDENT: return " RES ";
case M_SHARE: return " SHR "; case M_SHARE: return " SHR ";

View File

@ -555,7 +555,7 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
} }
int num = ProcessList_fread(this, status, "%d %d %d %d %d %d %d", int num = ProcessList_fread(this, status, "%d %d %d %d %d %d %d",
&process->m_size, &process->m_resident, &process->m_share, &process->m_size, &process->m_resident, &process->m_share,
&process->m_trs, &process->m_drs, &process->m_lrs, &process->m_trs, &process->m_lrs, &process->m_drs,
&process->m_dt); &process->m_dt);
fclose(status); fclose(status);