You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Java] Allocator buffer method no setting the capacity correctly. #141
So without setting the capacity explicitly the allocator overallocates memory and also seems to set the capacity of the buffer to that. That is contrary to the docstring of the buffer method:
Note that the buffer may technically be larger than the requested size for rounding purposes. However, the buffer's capacity will be set to the configured size.
The sentences are separated by dots, maybe this will be improved, but how I understand this is:
Note that the buffer may technically be larger than the requested size for rounding purposes. However, the buffer's capacity will be adjusted based on the configured size using the method properly (buffer.capacity).
Activity
vibhatha commentedon Jan 16, 2024
@FiV0 Did you look into the definition of
capacityfunction here?FiV0 commentedon Jan 16, 2024
@vibhatha The point of this ticket was for the
buffermethod for which (IMO) the docstring or implementation is wrong.davisusanibar commentedon Jan 17, 2024
Thanks for opening this issue, @FiV0.
The sentences are separated by dots, maybe this will be improved, but how I understand this is:
Note that the buffer may technically be larger than the requested size for rounding purposes. However, the buffer's capacity will be adjusted based on the configured size using the method properly (buffer.capacity).FiV0 commentedon Jan 17, 2024
@davisusanibar Then it's a misunderstanding on my part. Your docstring improvement than solves this ticket for me.
apacheGH-141: Correct capacity behavior in BufferAllocator.buffer doc…
apacheGH-141: [Docs] Fix broken Java API reference links in documenta…
apacheGH-141: Correct capacity behavior in BufferAllocator.buffer doc…