[erlang-questions] Max heap size

Tony Rogvall tony@REDACTED
Wed Apr 27 10:10:20 CEST 2016


Wonderful!

This will be useful.

Thanks

/Tony


> On 27 apr 2016, at 09:12, Lukas Larsson <lukas@REDACTED> wrote:
> 
> 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.
> 
> https://github.com/erlang/otp/pull/1032 <https://github.com/erlang/otp/pull/1032>
> 
> 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}}]).
> <0.66.0>
> 
> =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},
>                         {heap_block_size,843},
>                         {mbuf_size,0},
>                         {recent_size,176},
>                         {stack_size,0},
>                         {old_heap_size,288},
>                         {heap_size,232},
>                         {bin_vheap_size,0},
>                         {bin_vheap_block_size,46422},
>                         {bin_old_vheap_size,0},
>                         {bin_old_vheap_block_size,46422}]
> 
> Lukas
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160427/160f9efb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160427/160f9efb/attachment.bin>


More information about the erlang-questions mailing list