On Windows, assert if OS thread local storage slots run out

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • 9
    • Affects Version/s: hs23
    • Component/s: hotspot
    • generic
    • windows

      In src/os/windows/vm/os_windows.cpp, the code for os::allocate_thread_local_storage() is

        int os::allocate_thread_local_storage() {
          return TlsAlloc();
        }

      It would be better to assert if Windows runs out of TLS slots, vis.

        int os::allocate_thread_local_storage() {
          int key = TlsAlloc();
          assert(key != TLS_OUT_OF_INDEXES, "cannot allocate thread local storage");
          return key;
        }

            Assignee:
            Unassigned
            Reporter:
            Paul Hohensee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: