-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FastBuffer::resize will not resize below 200 #15
Comments
The second approach was useful if user doesn't know the length of the serialized data and doesn't want to precaculate it. We select to start with 200bytes. |
I understand. However, this requires that the memory for the buffer is managed externally. That is to alloc and de-allocate the external buffer. |
closed by e986a9e |
Connects to ros2/demos#185
I wonder why the implementation of
FastBuffer::resize
can't resize an empty buffer below 200.https://github.com/eProsima/Fast-CDR/blob/master/src/cpp/FastBuffer.cpp#L45-L81
If I have an empty buffer and want to resize it to an exact number of size - let's say I know how much data I want to copy into it - the minimum size of it is
BUFFER_START_LENGTH
, which is hard set to 200https://github.com/eProsima/Fast-CDR/blob/master/src/cpp/FastBuffer.cpp#L23
why is that?
The text was updated successfully, but these errors were encountered: