-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.2.0-rc5
-
Component/s: JavaScript
-
None
-
Fully Compatible
-
ALL
-
Platform D (12/11/15)
When extra threads are enabled in spidermonkey, objects with finalizers cannot be run from garbage collection threads. This prevents any of our native types from reaping in hot loops in js (at idle the main thread may decide to gc).
By invoking js::DisableExtraThreads() we can prevent all of the various helper threads from getting spun up. This means compilation, gc, etc. are all run from the runtime they're invoke in, rather than a helper. Unfortunately js::DisableExtraThreads is in vm/Runtime.h, a non-public header. We can simply forward declare it ourselves.
This appears to fix the memory leaks we see in SERVER-21709
- is depended on by
-
SERVER-21709 Map Reduce causes segfault in 3.2 RC4
- Closed
-
SERVER-21716 SpiderMonkey doesn't appear capable of gc'ing objects created during the map phase
- Closed