xintongsong 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_r328001905
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
##########
@@ -568,144 +569,26 @@ public int computeNumberOfPages(double fraction) {
throw new IllegalArgumentException("The fraction of
memory to allocate must within (0, 1].");
}
+ //noinspection NumericCastThatLosesPrecision
return (int) (totalNumPages * fraction / numberOfSlots);
}
Review comment:
I think we also need 'computeNumberOfPages' for specific memory type, for
the same reason as 'allocatePages'.
----------------------------------------------------------------
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