compute global and per-tid memory usage (alloc/free pages)

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>