leerho commented on code in PR #241:
URL:
https://github.com/apache/datasketches-memory/pull/241#discussion_r1847510620
##########
src/main/java/org/apache/datasketches/memory/WritableMemory.java:
##########
@@ -83,54 +83,50 @@ static WritableMemory writableWrap(
* required by the implementation.
*/
static WritableMemory writableMap(File file) throws IOException {
- return writableMap(file, 0, file.length(), ByteOrder.nativeOrder());
+ return writableMap(Arena.ofConfined(), file, 0, file.length(),
ByteOrder.nativeOrder());
}
/**
- * Maps the specified portion of the given file into Memory for write
operations.
- * @param file the given file to map. It must be non-null and writable.
+ * Maps the specified portion of the given file into Memory for write
operations with a ResourceScope.
Review Comment:
I think you meant _Arena_, but that isn't correct either. The write
operations of WritableMemory assume that the MemorySegment exists and has
already been allocated using an Arena.
--
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]