.TH erts_alloc 3erl "erts 8.2.1" "Ericsson AB" "C Library Functions" .SH NAME erts_alloc \- An Erlang runtime system internal memory allocator library. .SH DESCRIPTION .LP \fIerts_alloc\fR\& is an Erlang runtime system internal memory allocator library\&. \fIerts_alloc\fR\& provides the Erlang runtime system with a number of memory allocators\&. .SH "ALLOCATORS" .LP 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 \fIets\fR\& data\&. .TP 2 .B \fIdriver_alloc\fR\&: Allocator used for driver data\&. .TP 2 .B \fIliteral_alloc\fR\&: Allocator used for constant terms in Erlang code\&. .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 \fIexec_alloc\fR\&: Allocator used by the \fB\fIHiPE\fR\&\fR\& application for native executable code on specific architectures (x86_64)\&. .TP 2 .B \fIstd_alloc\fR\&: Allocator used for most memory blocks not allocated through 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\&. It is used by other allocators for allocating memory segments and is 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 to reduce the number of system calls made\&. .RE .LP \fIsys_alloc\fR\& and \fIliteral_alloc\fR\& are always enabled and cannot be disabled\&. \fIexec_alloc\fR\& is only available if it is needed 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, to achieve 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, so 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 through \fImseg_alloc\fR\&), or in the heap segment (allocated through \fIsys_alloc\fR\&)\&. .RS 2 .TP 2 * Multiblock carriers are used for storage of several blocks\&. .LP .TP 2 * Singleblock carriers are used for storage of one block\&. .LP .TP 2 * Blocks that are larger than the value of the singleblock carrier threshold (\fB\fIsbct\fR\&\fR\&) parameter are placed in singleblock carriers\&. .LP .TP 2 * Blocks that are smaller than the value of parameter \fIsbct\fR\& are placed in multiblock carriers\&. .LP .RE .LP 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 parameter \fB\fImmbcs\fR\&\fR\&\&. .LP Sizes of multiblock carriers allocated through \fImseg_alloc\fR\& are decided based on the following parameters: .RS 2 .TP 2 * The values of the largest multiblock carrier size (\fB\fIlmbcs\fR\&\fR\&) .LP .TP 2 * The smallest multiblock carrier size (\fB\fIsmbcs\fR\&\fR\&) .LP .TP 2 * The multiblock carrier growth stages (\fB\fImbcgs\fR\&\fR\&) .LP .RE .LP 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 is roughly \fIsmbcs+nc*(lmbcs-smbcs)/mbcgs\fR\& when \fInc <= mbcgs\fR\&, and \fIlmbcs\fR\& when \fInc > mbcgs\fR\&\&. If the value of parameter \fIsbct\fR\& is larger than the value of parameter \fIlmbcs\fR\&, the allocator may have to create multiblock carriers that are larger than the value of parameter \fIlmbcs\fR\&, though\&. Singleblock carriers allocated through \fImseg_alloc\fR\& are sized to whole pages\&. .LP Sizes of carriers allocated through \fIsys_alloc\fR\& are decided based on the value of the \fIsys_alloc\fR\& carrier size (\fB\fIycs\fR\&\fR\&) parameter\&. The size of a carrier is the least number of multiples of the value of parameter \fIycs\fR\& satisfying 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 can be configured using parameter \fB\fIas\fR\&\fR\&\&. The following strategies are available: .RS 2 .TP 2 .B Best fit: Strategy: Find the smallest block satisfying 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 satisfying 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 satisfying 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 "address 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) 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 can be configured using parameter \fB\fImbsd\fR\&\fR\&\&. .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 from ERTS 5\&.6\&.1 the emulator refuses to use this strategy on other allocators than \fItemp_alloc\fR\&\&. This because it only causes problems for other allocators\&. .RE .RE .LP Apart from the ordinary allocators described above, some 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 runtime system starts\&. As long as pre-allocated memory is available, it is used\&. When no pre-allocated memory is available, memory is allocated in ordinary allocators\&. These pre-allocators are typically much faster than the ordinary allocators, but can only satisfy a limited number of requests\&. .SH "SYSTEM FLAGS EFFECTING ERTS_ALLOC" .LP .RS -4 .B Warning: .RE Only use these flags if you are sure what you are doing\&. Unsuitable settings can 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 (\fB\fIerl(1)\fR\&\fR\&) as command-line arguments\&. .LP System flags effecting specific allocators have an uppercase letter as \fI\fR\&\&. The following letters are used for the 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 * \fII: literal_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 * \fIX: exec_alloc\fR\& .LP .TP 2 * \fIY: sys_alloc\fR\& .LP .RE .SS "Flags for Configuration of mseg_alloc" .RS 2 .TP 2 .B \fI+MMamcbf \fR\&: Absolute maximum 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\&. Defaults to \fI4096\fR\&\&. .TP 2 .B \fI+MMrmcbf \fR\&: Relative maximum 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 maximum cache bad fit percent of the requested size\&. Defaults to \fI20\fR\&\&. .TP 2 .B \fI+MMsco true|false\fR\&: Sets \fBsuper carrier\fR\& only flag\&. Defaults to \fItrue\fR\&\&. When a super carrier is used and this flag is \fItrue\fR\&, \fImseg_alloc\fR\& only creates carriers in the super carrier\&. Notice that the \fIalloc_util\fR\& framework can 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\& tries to create carriers outside of the super carrier when the super carrier is full\&. .LP .RS -4 .B Note: .RE Setting this flag to \fIfalse\fR\& is not supported on all systems\&. The flag is then ignored\&. .TP 2 .B \fI+MMscrfsd \fR\&: Sets \fBsuper carrier\fR\& reserved free segment descriptors\&. 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 is used\&. This can 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 \fB\fIerlang:system_info({allocator, mseg_alloc})\fR\&\fR\&\&. .TP 2 .B \fI+MMscrpm true|false\fR\&: Sets \fBsuper carrier\fR\& reserve physical memory flag\&. Defaults to \fItrue\fR\&\&. When this flag is \fItrue\fR\&, physical memory is reserved for the whole super carrier at once when it is created\&. The reservation is after that left unchanged\&. When this flag is set to \fIfalse\fR\&, only virtual address space is reserved for the super carrier upon creation\&. The system attempts to reserve physical memory upon carrier creations in the super carrier, and attempt to unreserve physical memory upon carrier destructions in the super carrier\&. .LP .RS -4 .B Note: .RE What reservation of physical memory means, highly depends on the operating system, and how it is configured\&. For example, different memory overcommit settings on Linux drastically change the behavior\&. .LP Setting this flag to \fIfalse\fR\& is possibly not supported on all systems\&. The flag is then ignored\&. .TP 2 .B \fI+MMscs \fR\&: Sets super carrier size (in MB)\&. Defaults to \fI0\fR\&, that is, the super carrier is by default disabled\&. The super carrier is a large continuous area in the virtual address space\&. \fImseg_alloc\fR\& always tries to create new carriers in the super carrier if it exists\&. Notice that the \fIalloc_util\fR\& framework can create \fIsys_alloc\fR\& carriers\&. For more information, see \fB\fI+MMsco\fR\&\fR\&\&. .TP 2 .B \fI+MMmcs \fR\&: Maximum cached segments\&. The maximum number of memory segments stored in the memory segment cache\&. Valid range is \fI[0, 30]\fR\&\&. Defaults to \fI10\fR\&\&. .RE .SS "Flags for Configuration of sys_alloc" .RS 2 .TP 2 .B \fI+MYe true\fR\&: Enables \fIsys_alloc\fR\&\&. .LP .RS -4 .B Note: .RE \fIsys_alloc\fR\& cannot be disabled\&. .TP 2 .B \fI+MYm libc\fR\&: \fImalloc\fR\& library to use\&. Only \fIlibc\fR\& is available\&. \fIlibc\fR\& enables the standard \fIlibc\fR\& \fImalloc\fR\& implementation\&. By default \fIlibc\fR\& is used\&. .TP 2 .B \fI+MYtt \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 is 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\& releases it (by calling \fIsbrk\fR\&)\&. Trim threshold is specified in kilobytes\&. Defaults to \fI128\fR\&\&. .LP .RS -4 .B Note: .RE This flag has effect only when the emulator is linked with the GNU C library, and uses its \fImalloc\fR\& implementation\&. .TP 2 .B \fI+MYtp \fR\&: Top pad size (in kilobytes)\&. This is the amount of extra memory that is allocated by \fImalloc\fR\& when \fIsbrk\fR\& is called to get more memory from the operating system\&. Defaults to \fI0\fR\&\&. .LP .RS -4 .B Note: .RE This flag has effect only when the emulator is linked with the GNU C library, and uses its \fImalloc\fR\& implementation\&. .RE .SS "Flags for Configuration of Allocators Based on alloc_util" .LP If \fIu\fR\& is used as subsystem identifier (that is, \fI = u\fR\&), all allocators based on \fIalloc_util\fR\& are 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 identifier is effected\&. .RS 2 .TP 2 .B \fI+Macul |de\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 > 0 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 is used\&. The value chosen depends on the allocator type and can be changed between ERTS versions\&. Defaults to \fIde\fR\&, but this can be changed in the future\&. .RS 2 .LP Carriers are abandoned when memory utilization in the allocator instance falls below the utilization value used\&. Once a carrier is abandoned, no new allocations are made in it\&. When an allocator instance gets an increased multiblock carrier need, it first tries to fetch an abandoned carrier from an allocator instance of the same allocator type\&. If no abandoned carrier can be fetched, it creates 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\&. Only the strategies \fIaoff\fR\&, \fIaoffcbf\fR\&, and \fIaoffcaobf\fR\& support abandoned carriers\&. .RE .RS 2 .LP This feature also requires \fBmultiple thread specific instances\fR\& to be enabled\&. When enabling this feature, multiple thread-specific instances are enabled if not already enabled, and the \fIaoffcbf\fR\& strategy is enabled if the current strategy does not support abandoned carriers\&. This feature can be enabled on all allocators based on the \fIalloc_util\fR\& framework, except \fItemp_alloc\fR\& (which would be pointless)\&. .RE .TP 2 .B \fI+Mas bf|aobf|aoff|aoffcbf|aoffcaobf|gf|af\fR\&: Allocation strategy\&. The following strategies are valid: .RS 2 .TP 2 * \fIbf\fR\& (best fit) .LP .TP 2 * \fIaobf\fR\& (address order best fit) .LP .TP 2 * \fIaoff\fR\& (address order first fit) .LP .TP 2 * \fIaoffcbf\fR\& (address order first fit carrier best fit) .LP .TP 2 * \fIaoffcaobf\fR\& (address order first fit carrier address order best fit) .LP .TP 2 * \fIgf\fR\& (good fit) .LP .TP 2 * \fIaf\fR\& (a fit) .LP .RE .RS 2 .LP See the description of allocation strategies in section \fBThe alloc_util Framework\fR\&\&. .RE .TP 2 .B \fI+Masbcst \fR\&: Absolute singleblock carrier shrink threshold (in kilobytes)\&. When a block located in an \fImseg_alloc\fR\& singleblock carrier is shrunk, the carrier is left unchanged if the amount of unused memory is less than this threshold, otherwise the carrier is shrunk\&. See also \fB\fIrsbcst\fR\&\fR\&\&. .TP 2 .B \fI+Me true|false\fR\&: Enables allocator \fI\fR\&\&. .TP 2 .B \fI+Mlmbcs \fR\&: Largest (\fImseg_alloc\fR\&) multiblock carrier size (in kilobytes)\&. See the description on how sizes for \fImseg_alloc\fR\& multiblock carriers are decided in section \fB The alloc_util Framework\fR\&\&. On 32-bit Unix style OS this limit cannot be set > 128 MB\&. .TP 2 .B \fI+Mmbcgs \fR\&: (\fImseg_alloc\fR\&) multiblock carrier growth stages\&. See the description on how sizes for \fImseg_alloc\fR\& multiblock carriers are decided in section \fB The alloc_util Framework\fR\&\&. .TP 2 .B \fI+Mmbsd \fR\&: Maximum block search depth\&. This flag has effect only if the good fit strategy is 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 maxiumum 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 \fI+Mmmbcs \fR\&: Main multiblock carrier size\&. Sets the size of the main multiblock carrier for allocator \fI\fR\&\&. The main multiblock carrier is allocated through \fIsys_alloc\fR\& and is never deallocated\&. .TP 2 .B \fI+Mmmmbc \fR\&: Maximum \fImseg_alloc\fR\& multiblock carriers\&. Maximum number of multiblock carriers allocated through \fImseg_alloc\fR\& by allocator \fI\fR\&\&. When this limit is reached, new multiblock carriers are allocated through \fIsys_alloc\fR\&\&. .TP 2 .B \fI+Mmmsbc \fR\&: Maximum \fImseg_alloc\fR\& singleblock carriers\&. Maximum number of singleblock carriers allocated through \fImseg_alloc\fR\& by allocator \fI\fR\&\&. When this limit is reached, new singleblock carriers are allocated through \fIsys_alloc\fR\&\&. .TP 2 .B \fI+Mramv \fR\&: Realloc always moves\&. When enabled, reallocate operations are more or less translated into an allocate, copy, free sequence\&. This often reduces memory fragmentation, but costs performance\&. .TP 2 .B \fI+Mrmbcmt \fR\&: Relative multiblock carrier move threshold (in percent)\&. When a block located in a multiblock carrier is shrunk, the block is moved if the ratio of the size of the returned memory compared to the previous size is more than this threshold, otherwise the block is shrunk at the current location\&. .TP 2 .B \fI+Mrsbcmt \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 parameter \fB\fIsbct\fR\&\fR\&, the block is left unchanged in the singleblock carrier if the ratio of unused memory is less than this threshold, otherwise it is moved into a multiblock carrier\&. .TP 2 .B \fI+Mrsbcst \fR\&: Relative singleblock carrier shrink threshold (in percent)\&. When a block located in an \fImseg_alloc\fR\& singleblock carrier is shrunk, the carrier is left unchanged if the ratio of unused memory is less than this threshold, otherwise the carrier is shrunk\&. See also \fB\fIasbcst\fR\&\fR\&\&. .TP 2 .B \fI+Msbct \fR\&: Singleblock carrier threshold\&. Blocks larger than this threshold are placed in singleblock carriers\&. Blocks smaller than this threshold are placed in multiblock carriers\&. On 32-bit Unix style OS this threshold cannot be set > 8 MB\&. .TP 2 .B \fI+Msmbcs \fR\&: Smallest (\fImseg_alloc\fR\&) multiblock carrier size (in kilobytes)\&. See the description on how sizes for \fImseg_alloc\fR\& multiblock carriers are decided in section \fB The alloc_util Framework\fR\&\&. .TP 2 .B \fI+Mt true|false\fR\&: Multiple, thread-specific instances of the allocator\&. This option has only effect on the runtime system with SMP support\&. Default behavior on the runtime system with SMP support is \fINoSchedulers+1\fR\& instances\&. Each scheduler uses a lock-free instance of its own and other threads use a common instance\&. .RS 2 .LP Before ERTS 5\&.9 it was possible to configure a smaller number of thread-specific instances than schedulers\&. This is, however, not possible anymore\&. .RE .RE .SS "Flags for Configuration of alloc_util" .LP All allocators based on \fIalloc_util\fR\& are effected\&. .RS 2 .TP 2 .B \fI+Muycs \fR\&: \fIsys_alloc\fR\& carrier size\&. Carriers allocated through \fIsys_alloc\fR\& are allocated in sizes that 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 \fI+Mummc \fR\&: Maximum \fImseg_alloc\fR\& carriers\&. Maximum number of carriers placed in separate memory segments\&. When this limit is reached, new carriers are placed in memory retrieved from \fIsys_alloc\fR\&\&. .TP 2 .B \fI+Musac \fR\&: Allow \fIsys_alloc\fR\& carriers\&. Defaults to \fItrue\fR\&\&. If set to \fIfalse\fR\&, \fIsys_alloc\fR\& carriers are never created by allocators using the \fIalloc_util\fR\& framework\&. .RE .SS "Special Flag for literal_alloc" .RS 2 .TP 2 .B \fI+MIscs \fR\&: \fIliteral_alloc\fR\& super carrier size (in MB)\&. The amount of \fIvirtual\fR\& address space reserved for literal terms in Erlang code on 64-bit architectures\&. Defaults to \fI1024\fR\& (that is, 1 GB), which is usually sufficient\&. The flag is ignored on 32-bit architectures\&. .RE .SS "Special Flag for exec_alloc" .RS 2 .TP 2 .B \fI+MXscs \fR\&: \fIexec_alloc\fR\& super carrier size (in MB)\&. The amount of \fIvirtual\fR\& address space reserved for native executable code used by the \fB\fIHiPE\fR\&\fR\& application on specific architectures (x86_64)\&. Defaults to \fI512\fR\&\&. .RE .SS "Instrumentation Flags" .RS 2 .TP 2 .B \fI+Mim true|false\fR\&: A map over current allocations is kept by the emulator\&. The allocation map can be retrieved through module \fB\fIinstrument(3erl)\fR\&\fR\&\&. \fI+Mim true\fR\& implies \fI+Mis true\fR\&\&. \fI+Mim true\fR\& is the same as flag \fB\fI-instr\fR\&\fR\& in \fIerl(1)\fR\&\&. .TP 2 .B \fI+Mis true|false\fR\&: Status over allocated memory is kept by the emulator\&. The allocation status can be retrieved through module \fB\fIinstrument(3erl)\fR\&\fR\&\&. .TP 2 .B \fI+Mit X\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\&. .SS "Other Flags" .RS 2 .TP 2 .B \fI+Mea min|max|r9c|r10b|r11b|config\fR\&: Options: .RS 2 .TP 2 .B \fImin\fR\&: Disables all allocators that can be disabled\&. .TP 2 .B \fImax\fR\&: Enables all allocators (default)\&. .TP 2 .B \fIr9c|r10b|r11b\fR\&: Configures all allocators as they were configured in respective Erlang/OTP release\&. These will eventually be removed\&. .TP 2 .B \fIconfig\fR\&: Disables features that cannot be enabled while creating an allocator configuration with \fB\fIerts_alloc_config(3erl)\fR\&\fR\&\&. .LP .RS -4 .B Note: .RE This option is to be used only while running \fIerts_alloc_config(3erl)\fR\&, \fInot\fR\& when using the created configuration\&. .RE .TP 2 .B \fI+Mlpm all|no\fR\&: Lock physical memory\&. Defaults to \fIno\fR\&, that is, no physical memory is locked\&. If set to \fIall\fR\&, all memory mappings made by the runtime system are locked into physical memory\&. If set to \fIall\fR\&, the runtime system fails 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 also fails with an out of memory condition if the user limit on the amount of locked memory is reached\&. .RE .SH "NOTES" .LP Only some default values have been presented here\&. For information about the currently used settings and the current status of the allocators, see \fB\fIerlang:system_info(allocator)\fR\&\fR\& and \fB\fIerlang:system_info({allocator, Alloc})\fR\&\fR\&\&. .LP .RS -4 .B Note: .RE Most of these flags are highly implementation-dependent and can 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 can even ignore them)\&. .LP The \fB\fIerts_alloc_config(3erl)\fR\&\fR\& tool 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 \fB\fIerl(1)\fR\&\fR\&, \fB\fIerlang(3erl)\fR\&\fR\&, \fB\fIerts_alloc_config(3erl)\fR\&\fR\&, \fB\fIinstrument(3erl)\fR\&\fR\&