[erlang-questions] Max heap size

Lukas Larsson lukas.larsson@REDACTED
Thu Apr 28 10:45:28 CEST 2016


On Thu, Apr 28, 2016 at 1:32 AM, Richard A. O'Keefe <ok@REDACTED>
wrote:

>
>    Wouldn't it be more suitable to have a process flag that would
>    instruct the VM to send a specific message to the process once
>    particular heap size have been reached and let process decide what
>    to do about it?
>
>
We could. I've yet to see a use-case for it though. The main problem is
that if you involve another process you introduce latency in between the
max_heap_size being triggered and the other process reacting to the
problem, and by then it may be too late. By instructing the process to kill
itself the user can know that the limit put on the process was not
breached.


>
> > Part of the point of the max_heap_size is that the process should be
> killed
> > without having to do the potentially expensive garbage collection that is
> > about to come, which is only achievable through an untrappable exit
> signal.
>
> I don't understand this.  How can you determine how much heap a process
> really needs without doing a garbage collection?
>
>
Feel free to ask for more details about how this is done if my answer in
the other mail regarding the GC initialization phase was not clear enough.

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160428/984055a2/attachment.htm>


More information about the erlang-questions mailing list