fix the amount to be reserved

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
add function to get remaining memory byte count

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>