dynamically calc ram size