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-588878235 I commented more in [FLINK-15094](https://issues.apache.org/jira/browse/FLINK-15094) about warning problem. There may be other workarounds to silence the warning. Also some more thoughts about the netty pooling approach. It contributes to direct memory limit which makes it hard to use interchangeably the native memory for managed batch and stream RocksDB. If we do not want to use cleaners (this PR, btw they also look like being an official tool in future Java), netty also uses reference counting. In this case to not rely on GC, every time memory segment issues a ByteBuffer view and increments the ref counter, the user code has to explicitly decrement it at some point and ensure that the ByteBuffer view will never be used afterwards. It is hard because the ByteBuffer view can be subsequently duplicated and/or sliced without contributing to ref counting. I can look more into this, maybe I overlook something.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
