pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/52669: htop displays wrong used memory



The following reply was made to PR pkg/52669; it has been noted by GNATS.

From: coypu%sdf.org@localhost
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/52669: htop displays wrong used memory
Date: Fri, 24 Nov 2017 01:51:36 +0000

 This happens because the calculation it uses is, in
 linux/Platform.c:Platform_setMemoryValues
 
 long int usedMem = pl->usedMem;
 		(where usedMem is total - free)
 usedMem -= buffersMem + cachedMem;
 
 In netbsd this is a negative number.
 
 for you:
 
 pl->usedMem = total - free = 299752 - 186724 = 113028k
 
 usedMem = pl->usedMem - buffersMem - cachedMem
         = 113028k     - 53334016   - 88768512
 	= -29074528
 
 and its bytes -> human unit conversion freaks out at negative numbers.
 


Home | Main Index | Thread Index | Old Index