[erlang-questions] Max heap size

Lukas Larsson lukas@REDACTED
Wed Apr 27 09:12:33 CEST 2016

Hello everyone,

I recently opened up a new pull request on Github that adds a new
process_flag that can be used to limit the heap size of a process.


I'd appreciate feedback on the api and semantics of the functionality.

A simple example of the new functionality looks like this:

1> spawn_opt(fun() -> lists:seq(1,10000) end, [{max_heap_size, #{size =>
1024, kill => true, error_logger => true}}]).

=ERROR REPORT==== 27-Apr-2016::09:08:26 ===
     Process:          <0.66.0> on node test@REDACTED
     Context:          maximum heap size reached
     Max heap size:    1024
     Total heap size:  1219
     Kill:             true
     Error Logger:     true
     GC Info:          [{old_heap_block_size,376},

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160427/e55944ba/attachment.htm>

More information about the erlang-questions mailing list