[Git][ghc/ghc][wip/andreask/m_warning] RTS: Emit warning when -M < -H
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Thu Mar 7 21:55:59 UTC 2024
Andreas Klebinger pushed to branch wip/andreask/m_warning at Glasgow Haskell Compiler / GHC
Commits:
0c35d34f by Andreas Klebinger at 2024-03-07T22:42:57+01:00
RTS: Emit warning when -M < -H
- - - - -
1 changed file:
- rts/RtsFlags.c
Changes:
=====================================
rts/RtsFlags.c
=====================================
@@ -1951,6 +1951,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_Word " )",
+ (StgWord64) RtsFlags.GcFlags.maxHeapSize * (StgWord64) BLOCK_SIZE);
RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c35d34f5909066e6725891f5fe12df2812b516c
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c35d34f5909066e6725891f5fe12df2812b516c
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240307/713a5e21/attachment-0001.html>
More information about the ghc-commits
mailing list