Provokes garbage collection on (nearly) every memory allocation. Intended to ferret out memory protection bugs. Also makes R run very slowly, unfortunately.
gctorture(on = TRUE)
gctorture2(step, wait = step, inhibit_release = FALSE)
| Parameter | Description |
|---|---|
on |
logical; turning it on/off. |
step |
integer; run GC every step allocations; step = 0 turns the GC torture off. |
wait |
integer; number of allocations to wait before starting GC torture. |
inhibit_release |
logical; do not release free objects for re-use: use with caution. |