Disable extra threads for JSRuntimes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.2.0-rc6
    • Affects Version/s: 3.2.0-rc5
    • Component/s: JavaScript
    • None
    • Fully Compatible
    • ALL
    • Platform D (12/11/15)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

              Assignee:
              Mira Carey
              Reporter:
              Mira Carey
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: