azagrebin commented on a change in pull request #9693: [FLINK-13984] Separate
on-heap and off-heap managed memory pools
URL: https://github.com/apache/flink/pull/9693#discussion_r333629391
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
##########
@@ -564,25 +529,6 @@ public int computeNumberOfPages(double fraction) {
return (int) (totalNumPages * fraction / numberOfSlots);
}
- /**
- * Computes the memory size of the fraction per slot.
- *
- * @param fraction The fraction of the memory of the task slot.
- * @return The number of pages corresponding to the memory fraction.
- */
- public long computeMemorySize(double fraction) {
Review comment:
True, we could leave this method for now. I am a bit sceptical about these
methods because they add another concern to this class which does not look like
being directly related to the manager because it does not do anything with
fractions. I would prefer to do it on the user side by calling
`getMemorySize/NumberOfPages` etc methods or introduce a utility method to
deduplicate the code.
My plan was that if we make memory manager per slot then the operator limit
calculation is even more straightforward and I would refactor it afterwards.
----------------------------------------------------------------
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