| # | Line 146 | Line 146 | sub include_top() { | |
|---|---|---|
| 146 | ||
| 147 | # get RAM slightly differently | |
| 148 | my($real) = `$sysctlbin -n hw.physmem`; | |
| 149 | < | my($free) = $real - `$sysctlbin -n hw.usermem`; |
| 149 | > | my($v_free_count) = `$sysctlbin -n vm.stats.vm.v_free_count`; |
| 150 | > | my($v_page_size) = `$sysctlbin -n vm.stats.vm.v_page_size`; |
| 151 | > | my($free) = $v_free_count * $v_page_size; |
| 152 | ||
| 153 | # turn bytes to megabytes | |
| 154 | $real = ($real / 1024) / 1024; | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |