Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7127377

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 9
    • hs23
    • 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;
        }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: