Added a reset macro to allow the buffer to be reused without new allocations until the old capacity is exceeded.