Add test, to not create negative memory value.

Change-Id: Ic0185643d3f02f341d894d6b8e7be4269d19068d
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Add total for private and share memories.

Change-Id: I11c1bfa1dba7f533fe9bd8ade6b63608aee68ca7