You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/18 11:14:10 UTC

[GitHub] [flink] azagrebin edited a comment on issue #11109: [FLINK-15758][MemManager] Release segment and its unsafe memory in GC Cleaner

azagrebin edited a comment on issue #11109: [FLINK-15758][MemManager] Release segment and its unsafe memory in GC Cleaner
URL: https://github.com/apache/flink/pull/11109#issuecomment-587408504
 
 
   @StephanEwen 
   
   Not sure, these changes are directly related to the warnings. The `HybridMemorySegment` and the GC cleaner of its unsafe memory does not strictly need `java.nio.ByteBuffer`s. It could be any other object handle (just private `Object` or `HybridMemorySegment` itself) which reference is kept in java code.
   
   We illegally use the private constructor mostly to convert the unsafe `HybridMemorySegment` to the `java.nio.ByteBuffer` API in `HybridMemorySegment#getOffHeapBuffer` and `HybridMemorySegment#wrap` for network and file IO. This is the root case. An alternative to the private constructor could be our internal implementation of `java.nio.ByteBuffer`, which could be similar to `DirectByteBuffer` but this is a bit tedious. Nothing else comes into my mind atm.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services