| 70 | |
| 71 | == Testing Rooting == |
| 72 | |
| 73 | === JS_GC_ZEAL (increased GC frequency) === |
| 74 | This is a debugging feature to increase the frequency of garbage collections. It should reveal issues that would only show up in rare cases under normal circumstances. |
| 75 | If the feature is enabled in the SpiderMonkey build (--enable-gczeal), you can set the environment variable JS_GC_ZEAL to configure debugging. |
| 76 | Set it to -1 to print a table of possible settings (or look up that table in jsgc.cpp). |
| 77 | |
| 78 | The most useful settings probably are: |
| 79 | {{{ |
| 80 | 2: GC every F allocations (default: 100)" |
| 81 | 7: Collect the nursery every N nursery allocations" |
| 82 | }}} |
| 83 | |
| 84 | You can append a number separated by a comma to specify F or N respectively (like "2,1" to GC after every allocation or "7,10" to do a minor GC every 10 nursery allocations). |
| 85 | With some settings the program gets extremely slow which makes it nearly impossible to use this feature to test a whole replay or even a normal game with maximum GC frequency. |