[Git][ghc/ghc][wip/andreask/m_warning] RTS: Emit warning when -M < -H

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Fri Mar 8 09:20:23 UTC 2024



Andreas Klebinger pushed to branch wip/andreask/m_warning at Glasgow Haskell Compiler / GHC


Commits:
a07a8987 by Andreas Klebinger at 2024-03-08T10:06:09+01:00
RTS: Emit warning when -M < -H

Fixes #24487

- - - - -


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/a07a89877a23136b0cf2cd791931b9646c6c59a9

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a07a89877a23136b0cf2cd791931b9646c6c59a9
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/20240308/4f13f444/attachment.html>


More information about the ghc-commits mailing list