using a more effcient library to estimate memory sizes