gianm commented on code in PR #12521:
URL: https://github.com/apache/druid/pull/12521#discussion_r873973314
##########
core/src/main/java/org/apache/druid/java/util/common/ByteBufferUtils.java:
##########
@@ -138,6 +144,45 @@ private static MethodHandle
unmapJava9(MethodHandles.Lookup lookup) throws Refle
return unmapper.bindTo(UnsafeUtils.theUnsafe());
}
+ /**
Review Comment:
Sure, I'll add the following. Let me know what you think.
```
/**
* Same as {@link ByteBuffer#allocateDirect(int)}, but returns a closeable
{@link ResourceHolder} that
* frees the buffer upon close.
*
* Direct (off-heap) buffers are an alternative to on-heap buffers that
allow memory to be managed
* outside the purview of the garbage collector. It's most useful when
allocating big chunks of memory,
* like processing buffers.
*/
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]