fixed Memory

2009-07-14

author
Alexandre "kAworu" Perrin <kaworu(a)kaworu,ch>
date
Tue Jul 14 02:28:25 2009 +0200
changeset 34
ef1cd5713bc3
parent 33
9ed40e6ce912
child 35
83338259d4b7
child 36
9390610240ee

fixed Memory

ProcessList.c file | annotate | diff | revisions
     1.1 --- a/ProcessList.c	Tue Jul 14 02:05:34 2009 +0200
     1.2 +++ b/ProcessList.c	Tue Jul 14 02:28:25 2009 +0200
     1.3 @@ -663,9 +663,10 @@
     1.4     this->usedMem    = Sysctl.getui("vm.stats.vm.v_wire_count") * PAGE_SIZE_KB;
     1.5     this->freeMem    = this->totalMem - this->usedMem;
     1.6     this->sharedMem  = vmt->t_rmshr;
     1.7 -   this->buffersMem = 0; /* linprocfs.c */
     1.8 +   this->buffersMem = Sysctl.geti("vfs.bufspace") / ONE_K;
     1.9     this->cachedMem  = Sysctl.getui("vm.stats.vm.v_cache_count") * PAGE_SIZE_KB;
    1.10     free(vmt);
    1.11 +   this->usedMem   += this->buffersMem + this->cachedMem; /* htop expect this */
    1.12  
    1.13     if (Sysctl.geti("vm.swap_enabled")) {
    1.14         int total = 0, used = 0;

mercurial