Merge "Fix GetFreeMemory to use fooprint limit instead of max memory."