Skip to content
Snippets Groups Projects
Commit 23c3e624 authored by Andreas Klebinger's avatar Andreas Klebinger Committed by Marge Bot
Browse files

RTS: Emit warning when -M < -H

Fixes #24487
parent a933aff3
No related branches found
No related tags found
No related merge requests found
......@@ -1959,6 +1959,9 @@ static void normaliseRtsOpts (void)
if (RtsFlags.GcFlags.maxHeapSize != 0 &&
RtsFlags.GcFlags.heapSizeSuggestion >
RtsFlags.GcFlags.maxHeapSize) {
errorBelch("Maximum heap size (-M) is smaller than suggested heap size (-H)\n"
"Setting maximum heap size to suggested heap size ( %" FMT_Word64 " )",
(StgWord64) RtsFlags.GcFlags.maxHeapSize * (StgWord64) BLOCK_SIZE);
RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment