[Git][ghc/ghc][master] RTS: Emit warning when -M < -H

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Apr 12 12:20:22 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00
RTS: Emit warning when -M < -H

Fixes #24487

- - - - -


1 changed file:

- rts/RtsFlags.c


Changes:

=====================================
rts/RtsFlags.c
=====================================
@@ -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;
     }
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/23c3e624fbb9089d96ff33d043b157e4edd43a79

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/23c3e624fbb9089d96ff33d043b157e4edd43a79
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/20240412/d73ac020/attachment.html>


More information about the ghc-commits mailing list