added up-front memory usage estimator function