Dynamically grow an appropriately sized buffer