Fixing display memory info on linux. Added some unit tests.