The gcdict dictionary provides garbage collection control and status capabilities.
Input(s) Op/Proc/Var Output(s) |
Description |
Control operators | |
- collect - |
Force a garbage collection. |
boolean setactive - |
Set whether the garbage collector is active. |
seconds setperiod - |
Set the inactivity period before the garbage collector will run. |
count setthreshold - |
Set the number of bytes of memory allocation that will trigger a garbage collection. |
State and statistics operators | |
- active boolean |
Get whether the garbage collector is active. |
- period seconds |
Get the inactivity period before the garbage collector will run. |
- threshold count |
Get the number of bytes of memory allocation that will trigger a garbage collection. |
- stats array |
Get garbage collection statistics. |
onyx:0> gcdict begin active end 1 sprint false
onyx:0> gcdict begin collect end onyx:0>
onyx:0> gcdict begin period end 1 sprint 60 onyx:0>
onyx:0> gcdict begin false setactive end onyx:0>
onyx:0> gcdict begin 60 setperiod end onyx:0>
onyx:0> gcdict begin 40000 setthreshold end onyx:0>
onyx:0> gcdict begin onyx:0> stats 2 sprint [28 280921 [118328 852] [904779 1007] [5707551 24205]] onyx:0>
onyx:0> gcdict begin threshold end 1 sprint 65536 onyx:0>