Commit 4d208aed authored by Simon Marlow's avatar Simon Marlow
Browse files

When using -H with -M<size>, don't exceed the maximum heap size

parent d68865de
......@@ -1528,7 +1528,11 @@ resize_generations (void)
RtsFlags.GcFlags.minOldGenSize);
if (RtsFlags.GcFlags.heapSizeSuggestionAuto) {
RtsFlags.GcFlags.heapSizeSuggestion = size;
if (max > 0) {
RtsFlags.GcFlags.heapSizeSuggestion = stg_min(max, size);
} else {
RtsFlags.GcFlags.heapSizeSuggestion = size;
}
}
// minimum size for generation zero
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment