Package the variables describing the memory status in a structure

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>