Fix condition for a free space in OffHeapMemoryBuffer.firstMatch()
--------------------------------------------------------------------
Key: DIRECTMEMORY-32
URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-32
Project: Apache DirectMemory
Issue Type: Bug
Reporter: Igor Babalich
Priority: Trivial
If the pointer is placed not in the beginning of the buffer, a free space have
to be calculated as a subtraction.
The fix could be like
if (ptr.free && (ptr.end-ptr.start+1) >= capacity) {
instead of
if (ptr.free && ptr.end >= capacity) {
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira