summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/8.2.1-notes.rst7
-rw-r--r--docs/users_guide/runtime_control.rst14
2 files changed, 21 insertions, 0 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst
index 3011a29700..2c237db4e6 100644
--- a/docs/users_guide/8.2.1-notes.rst
+++ b/docs/users_guide/8.2.1-notes.rst
@@ -14,10 +14,17 @@ The highlights since the 8.0 branch are:
- TODO FIXME
- SCC annotations can now be used for declarations.
+- Heap overflow throws an exception in certain circumstances.
Full details
------------
+- Heap overflow throws a catchable exception, provided that it was detected
+ by the RTS during a GC cycle due to the program exceeding a limit set by
+ ``+RTS -M``, and not due to an allocation being refused by the operating
+ system. This exception is thrown to the same thread that receives
+ ``UserInterrupt`` exceptions, and may be caught by user programs.
+
Language
~~~~~~~~
diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst
index 54c7508ba8..4bde81a9d8 100644
--- a/docs/users_guide/runtime_control.rst
+++ b/docs/users_guide/runtime_control.rst
@@ -644,6 +644,20 @@ performance.
``-F`` parameter will be reduced in order to avoid exceeding the
maximum heap size.
+.. rts-flag:: -Mgrace= ⟨size⟩
+
+ :default: 1M
+
+ .. index::
+ single: heap size, grace
+
+ If the program's heap exceeds the value set by :rts-flag:`-M`, the
+ RTS throws an exception to the program, and the program gets an
+ additional quota of allocation before the exception is raised
+ again, the idea being so that the program can execute its
+ exception handlers. ``-Mgrace=`` controls the size of this
+ additional quota.
+
.. rts-flag:: --numa
--numa=<mask>