Monitor Process Memory

Lukas Larsson lukas@REDACTED
Thu Sep 30 13:24:27 CEST 2021


Maybe http://erlang.org/doc/man/erlang.html#process_flag_max_heap_size is
what you want?

On Thu, Sep 30, 2021 at 1:04 PM Vance Shipley <vances@REDACTED> wrote:

> I have a function in user_default which I would like to protect
> against naive users consuming all the memory.  It runs a loop building
> an accumulator which is a list of records.
>
> I could just use a guard of length(Acc) < ?MAXLEN however I don't
> really know how big the records are. I'd like to stop when too much
> memory is being used by Acc, or maybe the (shell) process.
>
> Any suggestions?
>
> --
>      -Vance
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210930/9845713f/attachment.htm>


More information about the erlang-questions mailing list