docs: add documentation for the -gc compiler flag
Этот коммит содержится в:
родитель
8402e84b6d
коммит
74b5e28a38
1 изменённых файлов: 20 добавлений и 0 удалений
|
@ -129,6 +129,26 @@ There are a few flags to control how binaries are built:
|
||||||
Print output of the on-chip debugger tool (like OpenOCD) while in a ``tinygo
|
Print output of the on-chip debugger tool (like OpenOCD) while in a ``tinygo
|
||||||
gdb`` session. This can be useful to diagnose connection problems.
|
gdb`` session. This can be useful to diagnose connection problems.
|
||||||
|
|
||||||
|
``-gc``
|
||||||
|
Use the specified memory manager.
|
||||||
|
|
||||||
|
``-gc=none``
|
||||||
|
Do not use a memory manager at all. This will cause a link error at
|
||||||
|
every place in the program that tries to allocate memory. The primary
|
||||||
|
use case for this is finding such locations.
|
||||||
|
|
||||||
|
``-gc=dumb``
|
||||||
|
Only allocate memory, never free it. This is the simplest allocator
|
||||||
|
possible and uses very few resources while being very portable. Also,
|
||||||
|
allocation is very fast. Larger programs will likely need a real garbage
|
||||||
|
collector.
|
||||||
|
|
||||||
|
``-gc=marksweep``
|
||||||
|
Simple conservative mark/sweep garbage collector. This collector does
|
||||||
|
not yet work on all platforms. Also, the performance of the collector is
|
||||||
|
highly unpredictable as any allocation may trigger a garbage collection
|
||||||
|
cycle.
|
||||||
|
|
||||||
|
|
||||||
Miscellaneous options
|
Miscellaneous options
|
||||||
---------------------
|
---------------------
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче