Make use of `size` param in resize_buffer