.TH erts_alloc 3erl "erts 6.2" "Ericsson AB" "C Library Functions" .SH NAME erts_alloc \- An Erlang Run-Time System internal memory allocator library. .SH DESCRIPTION .LP \fIerts_alloc\fR\& is an Erlang Run-Time System internal memory allocator library\&. \fIerts_alloc\fR\& provides the Erlang Run-Time System with a number of memory allocators\&. .SH "ALLOCATORS" .LP Currently the following allocators are present: .RS 2 .TP 2 .B \fItemp_alloc\fR\&: Allocator used for temporary allocations\&. .TP 2 .B \fIeheap_alloc\fR\&: Allocator used for Erlang heap data, such as Erlang process heaps\&. .TP 2 .B \fIbinary_alloc\fR\&: Allocator used for Erlang binary data\&. .TP 2 .B \fIets_alloc\fR\&: Allocator used for ETS data\&. .TP 2 .B \fIdriver_alloc\fR\&: Allocator used for driver data\&. .TP 2 .B \fIsl_alloc\fR\&: Allocator used for memory blocks that are expected to be short-lived\&. .TP 2 .B \fIll_alloc\fR\&: Allocator used for memory blocks that are expected to be long-lived, for example Erlang code\&. .TP 2 .B \fIfix_alloc\fR\&: A fast allocator used for some frequently used fixed size data types\&. .TP 2 .B \fIstd_alloc\fR\&: Allocator used for most memory blocks not allocated via any of the other allocators described above\&. .TP 2 .B \fIsys_alloc\fR\&: This is normally the default \fImalloc\fR\& implementation used on the specific OS\&. .TP 2 .B \fImseg_alloc\fR\&: A memory segment allocator\&. \fImseg_alloc\fR\& is used by other allocators for allocating memory segments and is currently only available on systems that have the \fImmap\fR\& system call\&. Memory segments that are deallocated are kept for a while in a segment cache before they are destroyed\&. When segments are allocated, cached segments are used if possible instead of creating new segments\&. This in order to reduce the number of system calls made\&. .RE .LP \fIsys_alloc\fR\& is always enabled and cannot be disabled\&. \fImseg_alloc\fR\& is always enabled if it is available and an allocator that uses it is enabled\&. All other allocators can be \fBenabled or disabled\fR\&\&. By default all allocators are enabled\&. When an allocator is disabled, \fIsys_alloc\fR\& is used instead of the disabled allocator\&. .LP The main idea with the \fIerts_alloc\fR\& library is to separate memory blocks that are used differently into different memory areas, and by this achieving less memory fragmentation\&. By putting less effort in finding a good fit for memory blocks that are frequently allocated than for those less frequently allocated, a performance gain can be achieved\&. .SH "THE ALLOC_UTIL FRAMEWORK" .LP Internally a framework called \fIalloc_util\fR\& is used for implementing allocators\&. \fIsys_alloc\fR\&, and \fImseg_alloc\fR\& do not use this framework; hence, the following does \fInot\fR\& apply to them\&. .LP An allocator manages multiple areas, called carriers, in which memory blocks are placed\&. A carrier is either placed in a separate memory segment (allocated via \fImseg_alloc\fR\&), or in the heap segment (allocated via \fIsys_alloc\fR\&)\&. Multiblock carriers are used for storage of several blocks\&. Singleblock carriers are used for storage of one block\&. Blocks that are larger than the value of the singleblock carrier threshold (\fBsbct\fR\&) parameter are placed in singleblock carriers\&. Blocks that are smaller than the value of the \fIsbct\fR\& parameter are placed in multiblock carriers\&. Normally an allocator creates a "main multiblock carrier"\&. Main multiblock carriers are never deallocated\&. The size of the main multiblock carrier is determined by the value of the \fBmmbcs\fR\& parameter\&. .LP Sizes of multiblock carriers allocated via \fImseg_alloc\fR\& are decided based on the values of the largest multiblock carrier size (\fBlmbcs\fR\&), the smallest multiblock carrier size (\fBsmbcs\fR\&), and the multiblock carrier growth stages (\fBmbcgs\fR\&) parameters\&. If \fInc\fR\& is the current number of multiblock carriers (the main multiblock carrier excluded) managed by an allocator, the size of the next \fImseg_alloc\fR\& multiblock carrier allocated by this allocator will roughly be \fIsmbcs+nc*(lmbcs-smbcs)/mbcgs\fR\& when \fInc <= mbcgs\fR\&, and \fIlmbcs\fR\& when \fInc > mbcgs\fR\&\&. If the value of the \fIsbct\fR\& parameter should be larger than the value of the \fIlmbcs\fR\& parameter, the allocator may have to create multiblock carriers that are larger than the value of the \fIlmbcs\fR\& parameter, though\&. Singleblock carriers allocated via \fImseg_alloc\fR\& are sized to whole pages\&. .LP Sizes of carriers allocated via \fIsys_alloc\fR\& are decided based on the value of the \fIsys_alloc\fR\& carrier size (\fBycs\fR\&) parameter\&. The size of a carrier is the least number of multiples of the value of the \fIycs\fR\& parameter that satisfies the request\&. .LP Coalescing of free blocks are always performed immediately\&. Boundary tags (headers and footers) in free blocks are used which makes the time complexity for coalescing constant\&. .LP The memory allocation strategy used for multiblock carriers by an allocator is configurable via the \fBas\fR\& parameter\&. Currently the following strategies are available: .RS 2 .TP 2 .B Best fit: Strategy: Find the smallest block that satisfies the requested block size\&. .RS 2 .LP Implementation: A balanced binary search tree is used\&. The time complexity is proportional to log N, where N is the number of sizes of free blocks\&. .RE .TP 2 .B Address order best fit: Strategy: Find the smallest block that satisfies the requested block size\&. If multiple blocks are found, choose the one with the lowest address\&. .RS 2 .LP Implementation: A balanced binary search tree is used\&. The time complexity is proportional to log N, where N is the number of free blocks\&. .RE .TP 2 .B Address order first fit: Strategy: Find the block with the lowest address that satisfies the requested block size\&. .RS 2 .LP Implementation: A balanced binary search tree is used\&. The time complexity is proportional to log N, where N is the number of free blocks\&. .RE .TP 2 .B Address order first fit carrier best fit: Strategy: Find the \fIcarrier\fR\& with the lowest address that can satisfy the requested block size, then find a block within that carrier using the "best fit" strategy\&. .RS 2 .LP Implementation: Balanced binary search trees are used\&. The time complexity is proportional to log N, where N is the number of free blocks\&. .RE .TP 2 .B Address order first fit carrier address order best fit: Strategy: Find the \fIcarrier\fR\& with the lowest address that can satisfy the requested block size, then find a block within that carrier using the "adress order best fit" strategy\&. .RS 2 .LP Implementation: Balanced binary search trees are used\&. The time complexity is proportional to log N, where N is the number of free blocks\&. .RE .TP 2 .B Good fit: Strategy: Try to find the best fit, but settle for the best fit found during a limited search\&. .RS 2 .LP Implementation: The implementation uses segregated free lists with a maximum block search depth (in each list) in order to find a good fit fast\&. When the maximum block search depth is small (by default 3) this implementation has a time complexity that is constant\&. The maximum block search depth is configurable via the \fBmbsd\fR\& parameter\&. .RE .TP 2 .B A fit: Strategy: Do not search for a fit, inspect only one free block to see if it satisfies the request\&. This strategy is only intended to be used for temporary allocations\&. .RS 2 .LP Implementation: Inspect the first block in a free-list\&. If it satisfies the request, it is used; otherwise, a new carrier is created\&. The implementation has a time complexity that is constant\&. .RE .RS 2 .LP As of erts version 5\&.6\&.1 the emulator will refuse to use this strategy on other allocators than \fItemp_alloc\fR\&\&. This since it will only cause problems for other allocators\&. .RE .RE .LP Apart from the ordinary allocators described above a number of pre-allocators are used for some specific data types\&. These pre-allocators pre-allocate a fixed amount of memory for certain data types when the run-time system starts\&. As long as pre-allocated memory is available, it will be used\&. When no pre-allocated memory is available, memory will be allocated in ordinary allocators\&. These pre-allocators are typically much faster than the ordinary allocators, but can only satisfy a limited amount of requests\&. .SH "SYSTEM FLAGS EFFECTING ERTS_ALLOC" .LP .RS -4 .B Warning: .RE Only use these flags if you are absolutely sure what you are doing\&. Unsuitable settings may cause serious performance degradation and even a system crash at any time during operation\&. .LP Memory allocator system flags have the following syntax: \fI+M

\fR\& where \fI\fR\& is a letter identifying a subsystem, \fI

\fR\& is a parameter, and \fI\fR\& is the value to use\&. The flags can be passed to the Erlang emulator (\fBerl\fR\&) as command line arguments\&. .LP System flags effecting specific allocators have an upper-case letter as \fI\fR\&\&. The following letters are used for the currently present allocators: .RS 2 .TP 2 * \fIB: binary_alloc\fR\& .LP .TP 2 * \fID: std_alloc\fR\& .LP .TP 2 * \fIE: ets_alloc\fR\& .LP .TP 2 * \fIF: fix_alloc\fR\& .LP .TP 2 * \fIH: eheap_alloc\fR\& .LP .TP 2 * \fIL: ll_alloc\fR\& .LP .TP 2 * \fIM: mseg_alloc\fR\& .LP .TP 2 * \fIR: driver_alloc\fR\& .LP .TP 2 * \fIS: sl_alloc\fR\& .LP .TP 2 * \fIT: temp_alloc\fR\& .LP .TP 2 * \fIY: sys_alloc\fR\& .LP .RE .LP The following flags are available for configuration of \fImseg_alloc\fR\&: .RS 2 .TP 2 .B \fB\fI+MMamcbf \fR\&\fR\&: Absolute max cache bad fit (in kilobytes)\&. A segment in the memory segment cache is not reused if its size exceeds the requested size with more than the value of this parameter\&. Default value is 4096\&. .TP 2 .B \fB\fI+MMrmcbf \fR\&\fR\&: Relative max cache bad fit (in percent)\&. A segment in the memory segment cache is not reused if its size exceeds the requested size with more than relative max cache bad fit percent of the requested size\&. Default value is 20\&. .TP 2 .B \fB\fI+MMsco true|false\fR\&\fR\&: Set \fBsuper carrier\fR\& only flag\&. This flag defaults to \fItrue\fR\&\&. When a super carrier is used and this flag is \fItrue\fR\&, \fImseg_alloc\fR\& will only create carriers in the super carrier\&. Note that the \fIalloc_util\fR\& framework may create \fIsys_alloc\fR\& carriers, so if you want all carriers to be created in the super carrier, you therefore want to disable use of \fIsys_alloc\fR\& carriers by also passing \fB\fI+Musac false\fR\&\fR\&\&. When the flag is \fIfalse\fR\&, \fImseg_alloc\fR\& will try to create carriers outside of the super carrier when the super carrier is full\&. .br .br \fINOTE\fR\&: Setting this flag to \fIfalse\fR\& may not be supported on all systems\&. This flag will in that case be ignored\&. .br .br \fINOTE\fR\&: The super carrier cannot be enabled nor disabled on halfword heap systems\&. This flag will be ignored on halfword heap systems\&. .TP 2 .B \fB\fI+MMscrfsd \fR\&\fR\&: Set \fBsuper carrier\fR\& reserved free segment descriptors\&. This parameter defaults to \fI65536\fR\&\&. This parameter determines the amount of memory to reserve for free segment descriptors used by the super carrier\&. If the system runs out of reserved memory for free segment descriptors, other memory will be used\&. This may however cause fragmentation issues, so you want to ensure that this never happens\&. The maximum amount of free segment descriptors used can be retrieved from the \fIerts_mmap\fR\& tuple part of the result from calling \fBerlang:system_info({allocator, mseg_alloc})\fR\&\&. .TP 2 .B \fB\fI+MMscrpm true|false\fR\&\fR\&: Set \fBsuper carrier\fR\& reserve physical memory flag\&. This flag defaults to \fItrue\fR\&\&. When this flag is \fItrue\fR\&, physical memory will be reserved for the whole super carrier at once when it is created\&. The reservation will after that be left unchanged\&. When this flag is set to \fIfalse\fR\& only virtual address space will be reserved for the super carrier upon creation\&. The system will attempt to reserve physical memory upon carrier creations in the super carrier, and attempt to unreserve physical memory upon carrier destructions in the super carrier\&. .br .br \fINOTE\fR\&: What reservation of physical memory actually means highly depends on the operating system, and how it is configured\&. For example, different memory overcommit settings on Linux drastically change the behaviour\&. Also note, setting this flag to \fIfalse\fR\& may not be supported on all systems\&. This flag will in that case be ignored\&. .br .br \fINOTE\fR\&: The super carrier cannot be enabled nor disabled on halfword heap systems\&. This flag will be ignored on halfword heap systems\&. .TP 2 .B \fB\fI+MMscs \fR\&\fR\&: Set super carrier size (in MB)\&. The super carrier size defaults to zero; i\&.e, the super carrier is by default disabled\&. The super carrier is a large continuous area in the virtual address space\&. \fImseg_alloc\fR\& will always try to create new carriers in the super carrier if it exists\&. Note that the \fIalloc_util\fR\& framework may create \fIsys_alloc\fR\& carriers\&. For more information on this, see the documentation of the \fB\fI+MMsco\fR\&\fR\& flag\&. .br .br \fINOTE\fR\&: The super carrier cannot be enabled nor disabled on halfword heap systems\&. This flag will be ignored on halfword heap systems\&. .TP 2 .B \fB\fI+MMmcs \fR\&\fR\&: Max cached segments\&. The maximum number of memory segments stored in the memory segment cache\&. Valid range is 0-30\&. Default value is 10\&. .RE .LP The following flags are available for configuration of \fIsys_alloc\fR\&: .RS 2 .TP 2 .B \fB\fI+MYe true\fR\&\fR\&: Enable \fIsys_alloc\fR\&\&. Note: \fIsys_alloc\fR\& cannot be disabled\&. .TP 2 .B \fB\fI+MYm libc\fR\&\fR\&: \fImalloc\fR\& library to use\&. Currently only \fIlibc\fR\& is available\&. \fIlibc\fR\& enables the standard \fIlibc\fR\& malloc implementation\&. By default \fIlibc\fR\& is used\&. .TP 2 .B \fB\fI+MYtt \fR\&\fR\&: Trim threshold size (in kilobytes)\&. This is the maximum amount of free memory at the top of the heap (allocated by \fIsbrk\fR\&) that will be kept by \fImalloc\fR\& (not released to the operating system)\&. When the amount of free memory at the top of the heap exceeds the trim threshold, \fImalloc\fR\& will release it (by calling \fIsbrk\fR\&)\&. Trim threshold is given in kilobytes\&. Default trim threshold is 128\&. \fINote:\fR\& This flag will only have any effect when the emulator has been linked with the GNU C library, and uses its \fImalloc\fR\& implementation\&. .TP 2 .B \fB\fI+MYtp \fR\&\fR\&: Top pad size (in kilobytes)\&. This is the amount of extra memory that will be allocated by \fImalloc\fR\& when \fIsbrk\fR\& is called to get more memory from the operating system\&. Default top pad size is 0\&. \fINote:\fR\& This flag will only have any effect when the emulator has been linked with the GNU C library, and uses its \fImalloc\fR\& implementation\&. .RE .LP The following flags are available for configuration of allocators based on \fIalloc_util\fR\&\&. If \fIu\fR\& is used as subsystem identifier (i\&.e\&., \fI = u\fR\&) all allocators based on \fIalloc_util\fR\& will be effected\&. If \fIB\fR\&, \fID\fR\&, \fIE\fR\&, \fIF\fR\&, \fIH\fR\&, \fIL\fR\&, \fIR\fR\&, \fIS\fR\&, or \fIT\fR\& is used as subsystem identifier, only the specific allocator identified will be effected: .RS 2 .TP 2 .B \fB\fI+Macul |de\fR\&\fR\&: Abandon carrier utilization limit\&. A valid \fI\fR\& is an integer in the range \fI[0, 100]\fR\& representing utilization in percent\&. When a utilization value larger than zero is used, allocator instances are allowed to abandon multiblock carriers\&. If \fIde\fR\& (default enabled) is passed instead of a \fI\fR\&, a recomended non zero utilization value will be used\&. The actual value chosen depend on allocator type and may be changed between ERTS versions\&. Currently the default equals \fIde\fR\&, but this may be changed in the future\&. Carriers will be abandoned when memory utilization in the allocator instance falls below the utilization value used\&. Once a carrier has been abandoned, no new allocations will be made in it\&. When an allocator instance gets an increased multiblock carrier need, it will first try to fetch an abandoned carrier from an allocator instances of the same allocator type\&. If no abandoned carrier could be fetched, it will create a new empty carrier\&. When an abandoned carrier has been fetched it will function as an ordinary carrier\&. This feature has special requirements on the \fBallocation strategy\fR\& used\&. Currently only the strategies \fIaoff\fR\&, \fIaoffcbf\fR\& and \fIaoffcaobf\fR\& support abandoned carriers\&. This feature also requires \fBmultiple thread specific instances\fR\& to be enabled\&. When enabling this feature, multiple thread specific instances will be enabled if not already enabled, and the \fIaoffcbf\fR\& strategy will be enabled if current strategy does not support abandoned carriers\&. This feature can be enabled on all allocators based on the \fIalloc_util\fR\& framework with the exception of \fItemp_alloc\fR\& (which would be pointless)\&. .TP 2 .B \fB\fI+Mas bf|aobf|aoff|aoffcbf|aoffcaobf|gf|af\fR\&\fR\&: Allocation strategy\&. Valid strategies are \fIbf\fR\& (best fit), \fIaobf\fR\& (address order best fit), \fIaoff\fR\& (address order first fit), \fIaoffcbf\fR\& (address order first fit carrier best fit), \fIaoffcaobf\fR\& (address order first fit carrier address order best fit), \fIgf\fR\& (good fit), and \fIaf\fR\& (a fit)\&. See \fBthe description of allocation strategies\fR\& in "the \fIalloc_util\fR\& framework" section\&. .TP 2 .B \fB\fI+Masbcst \fR\&\fR\&: Absolute singleblock carrier shrink threshold (in kilobytes)\&. When a block located in an \fImseg_alloc\fR\& singleblock carrier is shrunk, the carrier will be left unchanged if the amount of unused memory is less than this threshold; otherwise, the carrier will be shrunk\&. See also \fBrsbcst\fR\&\&. .TP 2 .B \fB\fI+Me true|false\fR\&\fR\&: Enable allocator \fI\fR\&\&. .TP 2 .B \fB\fI+Mlmbcs \fR\&\fR\&: Largest (\fImseg_alloc\fR\&) multiblock carrier size (in kilobytes)\&. See \fBthe description on how sizes for mseg_alloc multiblock carriers are decided\fR\& in "the \fIalloc_util\fR\& framework" section\&. On 32-bit Unix style OS this limit can not be set higher than 128 megabyte\&. .TP 2 .B \fB\fI+Mmbcgs \fR\&\fR\&: (\fImseg_alloc\fR\&) multiblock carrier growth stages\&. See \fBthe description on how sizes for mseg_alloc multiblock carriers are decided\fR\& in "the \fIalloc_util\fR\& framework" section\&. .TP 2 .B \fB\fI+Mmbsd \fR\&\fR\&: Max block search depth\&. This flag has effect only if the good fit strategy has been selected for allocator \fI\fR\&\&. When the good fit strategy is used, free blocks are placed in segregated free-lists\&. Each free list contains blocks of sizes in a specific range\&. The max block search depth sets a limit on the maximum number of blocks to inspect in a free list during a search for suitable block satisfying the request\&. .TP 2 .B \fB\fI+Mmmbcs \fR\&\fR\&: Main multiblock carrier size\&. Sets the size of the main multiblock carrier for allocator \fI\fR\&\&. The main multiblock carrier is allocated via \fIsys_alloc\fR\& and is never deallocated\&. .TP 2 .B \fB\fI+Mmmmbc \fR\&\fR\&: Max \fImseg_alloc\fR\& multiblock carriers\&. Maximum number of multiblock carriers allocated via \fImseg_alloc\fR\& by allocator \fI\fR\&\&. When this limit has been reached, new multiblock carriers will be allocated via \fIsys_alloc\fR\&\&. .TP 2 .B \fB\fI+Mmmsbc \fR\&\fR\&: Max \fImseg_alloc\fR\& singleblock carriers\&. Maximum number of singleblock carriers allocated via \fImseg_alloc\fR\& by allocator \fI\fR\&\&. When this limit has been reached, new singleblock carriers will be allocated via \fIsys_alloc\fR\&\&. .TP 2 .B \fB\fI+Mramv \fR\&\fR\&: Realloc always moves\&. When enabled, reallocate operations will more or less be translated into an allocate, copy, free sequence\&. This often reduce memory fragmentation, but costs performance\&. .TP 2 .B \fB\fI+Mrmbcmt \fR\&\fR\&: Relative multiblock carrier move threshold (in percent)\&. When a block located in a multiblock carrier is shrunk, the block will be moved if the ratio of the size of the returned memory compared to the previous size is more than this threshold; otherwise, the block will be shrunk at current location\&. .TP 2 .B \fB\fI+Mrsbcmt \fR\&\fR\&: Relative singleblock carrier move threshold (in percent)\&. When a block located in a singleblock carrier is shrunk to a size smaller than the value of the \fBsbct\fR\& parameter, the block will be left unchanged in the singleblock carrier if the ratio of unused memory is less than this threshold; otherwise, it will be moved into a multiblock carrier\&. .TP 2 .B \fB\fI+Mrsbcst \fR\&\fR\&: Relative singleblock carrier shrink threshold (in percent)\&. When a block located in an \fImseg_alloc\fR\& singleblock carrier is shrunk, the carrier will be left unchanged if the ratio of unused memory is less than this threshold; otherwise, the carrier will be shrunk\&. See also \fBasbcst\fR\&\&. .TP 2 .B \fB\fI+Msbct \fR\&\fR\&: Singleblock carrier threshold\&. Blocks larger than this threshold will be placed in singleblock carriers\&. Blocks smaller than this threshold will be placed in multiblock carriers\&. On 32-bit Unix style OS this threshold can not be set higher than 8 megabytes\&. .TP 2 .B \fB\fI+Msmbcs \fR\&\fR\&: Smallest (\fImseg_alloc\fR\&) multiblock carrier size (in kilobytes)\&. See \fBthe description on how sizes for mseg_alloc multiblock carriers are decided\fR\& in "the \fIalloc_util\fR\& framework" section\&. .TP 2 .B \fB\fI+Mt true|false\fR\&\fR\&: Multiple, thread specific instances of the allocator\&. This option will only have any effect on the runtime system with SMP support\&. Default behaviour on the runtime system with SMP support is \fINoSchedulers+1\fR\& instances\&. Each scheduler will use a lock-free instance of its own and other threads will use a common instance\&. .RS 2 .LP It was previously (before ERTS version 5\&.9) possible to configure a smaller amount of thread specific instances than schedulers\&. This is, however, not possible any more\&. .RE .RE .LP Currently the following flags are available for configuration of \fIalloc_util\fR\&, i\&.e\&. all allocators based on \fIalloc_util\fR\& will be effected: .RS 2 .TP 2 .B \fB\fI+Muycs \fR\&\fR\&: \fIsys_alloc\fR\& carrier size\&. Carriers allocated via \fIsys_alloc\fR\& will be allocated in sizes which are multiples of the \fIsys_alloc\fR\& carrier size\&. This is not true for main multiblock carriers and carriers allocated during a memory shortage, though\&. .TP 2 .B \fB\fI+Mummc \fR\&\fR\&: Max \fImseg_alloc\fR\& carriers\&. Maximum number of carriers placed in separate memory segments\&. When this limit has been reached, new carriers will be placed in memory retrieved from \fIsys_alloc\fR\&\&. .TP 2 .B \fB\fI+Musac \fR\&\fR\&: Allow \fIsys_alloc\fR\& carriers\&. By default \fItrue\fR\&\&. If set to \fIfalse\fR\&, \fIsys_alloc\fR\& carriers will never be created by allocators using the \fIalloc_util\fR\& framework\&. .RE .LP Instrumentation flags: .RS 2 .TP 2 .B \fB\fI+Mim true|false\fR\&\fR\&: A map over current allocations is kept by the emulator\&. The allocation map can be retrieved via the \fIinstrument\fR\& module\&. \fI+Mim true\fR\& implies \fI+Mis true\fR\&\&. \fI+Mim true\fR\& is the same as \fB-instr\fR\&\&. .TP 2 .B \fB\fI+Mis true|false\fR\&\fR\&: Status over allocated memory is kept by the emulator\&. The allocation status can be retrieved via the \fIinstrument\fR\& module\&. .TP 2 .B \fB\fI+Mit X\fR\&\fR\&: Reserved for future use\&. Do \fInot\fR\& use this flag\&. .RE .LP .RS -4 .B Note: .RE When instrumentation of the emulator is enabled, the emulator uses more memory and runs slower\&. .LP Other flags: .RS 2 .TP 2 .B \fB\fI+Mea min|max|r9c|r10b|r11b|config\fR\&\fR\&: .RS 2 .TP 2 .B \fImin\fR\&: Disables all allocators that can be disabled\&. .TP 2 .B \fImax\fR\&: Enables all allocators (currently default)\&. .TP 2 .B \fIr9c|r10b|r11b\fR\&: Configures all allocators as they were configured in respective OTP release\&. These will eventually be removed\&. .TP 2 .B \fIconfig\fR\&: Disables features that cannot be enabled while creating an allocator configuration with \fBerts_alloc_config(3erl)\fR\&\&. Note, this option should only be used while running \fIerts_alloc_config\fR\&, \fInot\fR\& when using the created configuration\&. .RE .TP 2 .B \fB\fI+Mlpm all|no\fR\&\fR\&: Lock physical memory\&. The default value is \fIno\fR\&, i\&.e\&., no physical memory will be locked\&. If set to \fIall\fR\&, all memory mappings made by the runtime system, will be locked into physical memory\&. If set to \fIall\fR\&, the runtime system will fail to start if this feature is not supported, the user has not got enough privileges, or the user is not allowed to lock enough physical memory\&. The runtime system will also fail with an out of memory condition if the user limit on the amount of locked memory is reached\&. .RE .LP Only some default values have been presented here\&. \fBerlang:system_info(allocator)\fR\&, and \fBerlang:system_info({allocator, Alloc})\fR\& can be used in order to obtain currently used settings and current status of the allocators\&. .LP .RS -4 .B Note: .RE Most of these flags are highly implementation dependent, and they may be changed or removed without prior notice\&. .LP \fIerts_alloc\fR\& is not obliged to strictly use the settings that have been passed to it (it may even ignore them)\&. .LP \fBerts_alloc_config(3erl)\fR\& is a tool that can be used to aid creation of an \fIerts_alloc\fR\& configuration that is suitable for a limited number of runtime scenarios\&. .SH "SEE ALSO" .LP \fBerts_alloc_config(3erl)\fR\&, \fBerl(1)\fR\&, \fBinstrument(3erl)\fR\&, \fBerlang(3erl)\fR\&