[erlang-questions] Memory leak related to "driver_alloc"

John Högberg john.hogberg@REDACTED
Thu May 3 09:38:18 CEST 2018


On Wed, May 02, 2018 at 07:08:34PM +0200, Florian Odronitz wrote:
> When I log into the node I see erlang:memory() reporting 14,6 GB of
> memory basically all attributed to "system".
> Digging deeper recon_alloc:memory(allocated_types) finds that
> basically all the memory is allocated by "driver_alloc".

If you can try out OTP 21-rc1, the new memory instrumentation features
will help you find the culprit:

http://blog.erlang.org/Memory-instrumentation-in-OTP-21/

> I don't fully understand what driver_alloc contains and what could
> drive its growth.
> Any thoughts?

`driver_alloc` is used for general allocations in drivers and NIFs,
e.g. `enif_alloc()`, `erl_drv_thread_create()`, or
`enif_inspect_iovec()`.

Regards,
John Högberg


More information about the erlang-questions mailing list