<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Wonderful!<div class=""><br class=""></div><div class="">This will be useful.</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class="">/Tony</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 27 apr 2016, at 09:12, Lukas Larsson <<a href="mailto:lukas@erlang.org" class="">lukas@erlang.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello everyone,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/erlang/otp/pull/1032" class="">https://github.com/erlang/otp/pull/1032</a><br class=""></div><div class=""><br class=""></div><div class="">I'd appreciate feedback on the api and semantics of the functionality.</div><div class=""><br class=""></div><div class="">A simple example of the new functionality looks like this:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><font face="monospace, monospace" class="">1> spawn_opt(fun() -> lists:seq(1,10000) end, [{max_heap_size, #{size => 1024, kill => true, error_logger => true}}]).</font></div><div class=""><font face="monospace, monospace" class=""><0.66.0></font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="monospace, monospace" class="">=ERROR REPORT==== 27-Apr-2016::09:08:26 ===</font></div><div class=""><font face="monospace, monospace" class=""> Process: <0.66.0> on node test@anon</font></div><div class=""><font face="monospace, monospace" class=""> Context: maximum heap size reached</font></div><div class=""><font face="monospace, monospace" class=""> Max heap size: 1024</font></div><div class=""><font face="monospace, monospace" class=""> Total heap size: 1219</font></div><div class=""><font face="monospace, monospace" class=""> Kill: true</font></div><div class=""><font face="monospace, monospace" class=""> Error Logger: true</font></div><div class=""><font face="monospace, monospace" class=""> GC Info: [{old_heap_block_size,376},</font></div><div class=""><font face="monospace, monospace" class=""> {heap_block_size,843},</font></div><div class=""><font face="monospace, monospace" class=""> {mbuf_size,0},</font></div><div class=""><font face="monospace, monospace" class=""> {recent_size,176},</font></div><div class=""><font face="monospace, monospace" class=""> {stack_size,0},</font></div><div class=""><font face="monospace, monospace" class=""> {old_heap_size,288},</font></div><div class=""><font face="monospace, monospace" class=""> {heap_size,232},</font></div><div class=""><font face="monospace, monospace" class=""> {bin_vheap_size,0},</font></div><div class=""><font face="monospace, monospace" class=""> {bin_vheap_block_size,46422},</font></div><div class=""><font face="monospace, monospace" class=""> {bin_old_vheap_size,0},</font></div><div class=""><font face="monospace, monospace" class=""> {bin_old_vheap_block_size,46422}]</font></div></div><div class=""><br class=""></div><div class="">Lukas</div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></body></html>