Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/859#discussion_r33020328 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java --- @@ -137,7 +137,13 @@ public static long getSizeOfFreeHeapMemoryWithDefrag() { */ public static long getSizeOfFreeHeapMemory() { Runtime r = Runtime.getRuntime(); - return r.maxMemory() - r.totalMemory() + r.freeMemory(); + long maxMemory = r.maxMemory(); + if (maxMemory == Long.MAX_VALUE) { + // workaround for some JVM versions + return r.freeMemory(); --- End diff -- We could fall back to a conservative value and print a warning that the memory has to be set manually. To set the memory manually, the user has to go through the LocalExecutor which is not a nice out of the box experience.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---