Skip to content
Commit a206cfc7 authored by Ting-Wei Lan's avatar Ting-Wei Lan
Browse files

freebsd: rework system memory usage

Change the value of memory usage from:

  Used   = Wired
  Free   = Total - Wired
  Shared = 0
  Buffer = 0
  Cached = Cache
  User   = Wired - Cache
  Locked = Not Supported

To:

  Used   = Total - Free
  Free   = Free
  Shared = 0
  Buffer = Buf
  Cached = Cache
  User   = Active + Wired
  Locked = Not Supported

The left-hand side means fields in the glibtop_mem struct and the right-hand
side means the value showed by `top' command. This change should make the value
showed by gnome-system-monitor, which uses `User' field, become closer to
the real memory usage.

All sysctlbyname code in sysdeps/freebsd/mem.c has been moved to separate
functions to make the code cleaner.
parent 58ca70ea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment