added nimAllocPagesViaMalloc switch (#18490)
* added switch * alloc.nim needs page aligned memory blocks
This commit is contained in:
parent
8c6dd2b9a9
commit
af3d2d8ad9
5 changed files with 46 additions and 7 deletions
14
doc/nimc.rst
14
doc/nimc.rst
|
|
@ -176,7 +176,7 @@ directories (in this order; later files overwrite previous settings):
|
|||
``%APPDATA%/nim/nim.cfg`` (Windows).
|
||||
This file can be skipped with the `--skipUserCfg`:option: command line
|
||||
option.
|
||||
3) ``$parentDir/nim.cfg`` where ``$parentDir`` stands for any parent
|
||||
3) ``$parentDir/nim.cfg`` where ``$parentDir`` stands for any parent
|
||||
directory of the project file's path.
|
||||
These files can be skipped with the `--skipParentCfg`:option:
|
||||
command-line option.
|
||||
|
|
@ -634,6 +634,18 @@ optimization in the compiler and linker.
|
|||
Check the `Cross-compilation`_ section for instructions on how to compile the
|
||||
program for your target.
|
||||
|
||||
|
||||
nimAllocPagesViaMalloc
|
||||
----------------------
|
||||
|
||||
Nim's default allocator is based on TLSF, this algorithm was designed for embedded
|
||||
devices. This allocator gets blocks/pages of memory via a currently undocumented
|
||||
`osalloc` API which usually uses POSIX's `mmap` call. On many environments `mmap`
|
||||
is not available but C's `malloc` is. You can use the `nimAllocPagesViaMalloc`
|
||||
define to use `malloc` instead of `mmap`. `nimAllocPagesViaMalloc` is currently
|
||||
only supported with `--gc:arc` or `--gc:orc`. (Since version 1.6)
|
||||
|
||||
|
||||
Nim for realtime systems
|
||||
========================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue