aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-05-11 09:22:53 +0200
committerLukas Larsson <[email protected]>2016-05-11 09:22:53 +0200
commit76378f21242b8036bac1b187e895bcafa28201da (patch)
tree7b4f7927292cb193854b3012573d17e371e4ed6a /lib
parent8bc9c88cd98bbbcc18265a7aed830b73f5133cf6 (diff)
parent36dd5c3dd86c91d04a7fc13fd2a89b10af64db5a (diff)
downloadotp-76378f21242b8036bac1b187e895bcafa28201da.tar.gz
otp-76378f21242b8036bac1b187e895bcafa28201da.tar.bz2
otp-76378f21242b8036bac1b187e895bcafa28201da.zip
Merge branch 'lukas/erts/max_heap_size/OTP-13174'
* lukas/erts/max_heap_size/OTP-13174: erts: Fix max heap size exit when in hipe mode Update preloaded modules erts: Fix pre-bif yield current_function erts: Implement max_heap_size process flag
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/doc/src/proc_lib.xml7
-rw-r--r--lib/stdlib/src/proc_lib.erl5
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/proc_lib.xml b/lib/stdlib/doc/src/proc_lib.xml
index 245580b1ba..f02b1f0651 100644
--- a/lib/stdlib/doc/src/proc_lib.xml
+++ b/lib/stdlib/doc/src/proc_lib.xml
@@ -73,6 +73,13 @@
<name name="priority_level"/>
</datatype>
<datatype>
+ <name name="max_heap_size"/>
+ <desc>
+ <p>See <seealso marker="erts:erlang#process_flag_max_heap_size">
+ erlang:process_flag(max_heap_size, MaxHeapSize)</seealso>.</p>
+ </desc>
+ </datatype>
+ <datatype>
<name name="dict_or_pid"/>
</datatype>
</datatypes>
diff --git a/lib/stdlib/src/proc_lib.erl b/lib/stdlib/src/proc_lib.erl
index fdc2ae4070..4a19603ec2 100644
--- a/lib/stdlib/src/proc_lib.erl
+++ b/lib/stdlib/src/proc_lib.erl
@@ -43,9 +43,14 @@
%%-----------------------------------------------------------------------------
-type priority_level() :: 'high' | 'low' | 'max' | 'normal'.
+-type max_heap_size() :: non_neg_integer() |
+ #{ size => non_neg_integer(),
+ kill => true,
+ error_logger => true}.
-type spawn_option() :: 'link'
| 'monitor'
| {'priority', priority_level()}
+ | {'max_heap_size', max_heap_size()}
| {'min_heap_size', non_neg_integer()}
| {'min_bin_vheap_size', non_neg_integer()}
| {'fullsweep_after', non_neg_integer()}