Arcane has included a memory pool mechanism since version 3.14.10 (November 2024) that allows retaining a portion of the memory allocated for accelerators, thereby avoiding costly calls to allocation or deallocation functions.
It is possible to enable and modify the behavior of the memory pool by setting environment variables.
| Environment Variable | Description |
|---|---|
| ARCANE_ACCELERATOR_MEMORY_POOL | Indicates the type of memory for which the pool should be activated. The values are specified by a combination of bits:
If the environment variable value is 7, for example, the memory pool is active for these 3 types of memory resources. If the value is 0, the memory pool is disabled for all memories. |
| ARCANE_ACCELERATOR_MEMORY_POOL_MAX_BLOCK_SIZE | Indicates the maximum size (in bytes) of the blocks kept in the memory pool. A high value allows for fewer allocations and deallocations but, in return, retains more memory, which reduces the amount available for allocations that do not go through the memory pool. The default value is 1MB (1024*1024). |
| ARCANE_ACCELERATOR_MEMORY_PRINT_LEVEL | Indicates whether memory usage information is displayed. This information is useful for debugging only. Possible values are:
|