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,8 +1528,12 @@ resize_generations (void)
RtsFlags.GcFlags.minOldGenSize);
if (RtsFlags.GcFlags.heapSizeSuggestionAuto) {
if (max > 0) {
RtsFlags.GcFlags.heapSizeSuggestion = stg_min(max, size);
} else {
RtsFlags.GcFlags.heapSizeSuggestion = size;
}
}
// minimum size for generation zero
min_alloc = stg_max((RtsFlags.GcFlags.pcFreeHeap * max) / 200,
......
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