Added ignoreStackAndRegisters parameter to GC_step
This commit is contained in:
parent
d2cfd71627
commit
f288eb7543
3 changed files with 33 additions and 25 deletions
|
|
@ -56,7 +56,7 @@ file as well). With this switch the GC supports the following operations:
|
|||
|
||||
.. code-block:: nim
|
||||
proc GC_setMaxPause*(MaxPauseInUs: int)
|
||||
proc GC_step*(us: int, strongAdvice = false)
|
||||
proc GC_step*(us: int, strongAdvice, ignoreStackAndRegisters = false)
|
||||
|
||||
The unit of the parameters ``MaxPauseInUs`` and ``us`` is microseconds.
|
||||
|
||||
|
|
@ -75,7 +75,11 @@ These two procs are the two modus operandi of the realtime GC:
|
|||
This allows the GC to perform some work for up to ``us`` time. This is
|
||||
useful to call in a main loop to ensure the GC can do its work. To
|
||||
bind all GC activity to a ``GC_step`` call, deactivate the GC with
|
||||
``GC_disable`` at program startup.
|
||||
``GC_disable`` at program startup. Notice that you may ask GC to not
|
||||
scan stack and registers for references via ``ignoreStackAndRegisters``
|
||||
parameter. This may reduce the step time depending on the stack depth,
|
||||
but use it only when you are sure that neither the stack nor the registers
|
||||
contain unique references to objects that must be preserved.
|
||||
|
||||
These procs provide a "best effort" realtime guarantee; in particular the
|
||||
cycle collector is not aware of deadlines yet. Deactivate it to get more
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue