This is a bad choice of name.  It does not set the capacity to the given capacity.  Rather, it ensures the buffer is big enough to hold the requested capacity.  So BufferGrow() or similar would be more apt.