Re #7782. Use residentMem instead of availMem.

It *should* give about the same answer, but without the approximation
that nothing else on the system has changed.
Merge remote-tracking branch 'origin/feature/7782_use_residentmem'