top: drop problematic field totalmem
authorPhil Sutter <phil@nwl.cc>
Tue, 3 Nov 2009 22:11:14 +0000 (23:11 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 3 Nov 2009 22:24:09 +0000 (23:24 +0100)
commit556751c8c97720490bbab001efd3d79ed0df239a
tree37f1e2fe01831b38d88f464262853150cf2866ea
parente08bc8fad7bcad3bc404a49e9b1922814d35c103
top: drop problematic field totalmem

The field totalmem was formerly used to hold the percentage of used mem
by a process. So at update time, the field info.memmax was being
addressed, which is potentially being updated at the same time, As all
updating routines potentially run in parallel. Though there is an
(quite) easy fix for this: calculate the percentage upon object
printing. This works because conky synchronises all update routines
right before printing the result. (To omit locking on it's own.)
src/freebsd.c
src/openbsd.c
src/top.c
src/top.h