temp_alloc needs to be enabled explicitly on OTP 22 if compiled with SMALL_MEMORY

Alexandre Rodrigues alex.j.b.r@REDACTED
Sat Jan 30 14:29:44 CET 2021


I am working with OTP built with SMALL_MEMORY and I noticed a behaviour
change from OTP 20 to OTP 22 (I suspect that the change actually occurs on
the transition to OTP 21 but I was not able to test it yet).

OTP 20 when compiled with SMALL_MEMORY disables the allocators (the ones
based on alloc_util I believe) including the temp_alloc. From OTP 21,
according to the official documentation of erts_alloc, the temp_alloc
should be "always enabled and cannot be disabled".

Starting the emulator (OTP 20) with "erl +Mue true" on an OTP compiled with
SMALL_MEMORY enables the allocators based on alloc_util including the

OTP 22 when compiled with SMALL_MEMORY behaves in a similar way to OTP 20,
so the alloc_util based allocators are disabled including temp_alloc.

Now the behaviour difference is that starting the emulator (OTP 22) with
"erl +Mue true" enables the allocators based on alloc_util but doesn't
enable temp_alloc. To enable the temp_alloc it's required to be explicit
and starting it like `erl +Mue true +MTe true`. I actually don't know if
it's the reporting of which allocators are enabled that is broken or if
indeed the temp_alloc that is not enabled.

Is this the expected behaviour or a bug? The immediate visible consequence
is that if I compile OTP with SMALL_MEMORY it's no longer enough to start
the emulator with "erl +Mue true" to be able to call erlang:memory(), I
need to use "erl +Mue true +MTe true".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210130/86891a8f/attachment.htm>

More information about the erlang-questions mailing list