diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-07-15 17:58:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 17:58:47 +0200 |
commit | af3d2d8ad90c31161c34f0d4f82cd0ac4a9b3d00 (patch) | |
tree | 24e40815489abb750b4a9c6ca6e46bea7c8f94dc /doc/nimc.rst | |
parent | 8c6dd2b9a9157c0e0bd822d8a80d1014fc87ecd7 (diff) | |
download | Nim-af3d2d8ad90c31161c34f0d4f82cd0ac4a9b3d00.tar.gz |
added `nimAllocPagesViaMalloc` switch (#18490)
* added switch * alloc.nim needs page aligned memory blocks
Diffstat (limited to 'doc/nimc.rst')
-rw-r--r-- | doc/nimc.rst | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/nimc.rst b/doc/nimc.rst index 2b9f33cb5..070956860 100644 --- a/doc/nimc.rst +++ b/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 ======================== |