74 }; 75 76 enum ThreadPriority { // JLS 20.20.1-3 77 NoPriority = -1, // Initial non-priority value 78 MinPriority = 1, // Minimum priority 79 NormPriority = 5, // Normal (non-daemon) priority 80 NearMaxPriority = 9, // High priority, used for VMThread 81 MaxPriority = 10, // Highest priority, used for WatcherThread 82 // ensures that VMThread doesn't starve profiler 83 CriticalPriority = 11 // Critical thread priority 84 }; 85 86 // Executable parameter flag for os::commit_memory() and 87 // os::commit_memory_or_exit(). 88 const bool ExecMem = true; 89 90 // Typedef for structured exception handling support 91 typedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread); 92 93 class os: AllStatic { 94 public: 95 enum { page_sizes_max = 9 }; // Size of _page_sizes array (8 plus a sentinel) 96 97 private: 98 static OSThread* _starting_thread; 99 static address _polling_page; 100 static volatile int32_t * _mem_serialize_page; 101 static uintptr_t _serialize_page_mask; 102 public: 103 static size_t _page_sizes[page_sizes_max]; 104 105 private: 106 static void init_page_sizes(size_t default_page_size) { 107 _page_sizes[0] = default_page_size; 108 _page_sizes[1] = 0; // sentinel 109 } 110 111 static char* pd_reserve_memory(size_t bytes, char* addr = 0, 112 size_t alignment_hint = 0); 113 static char* pd_attempt_reserve_memory_at(size_t bytes, char* addr); | 74 }; 75 76 enum ThreadPriority { // JLS 20.20.1-3 77 NoPriority = -1, // Initial non-priority value 78 MinPriority = 1, // Minimum priority 79 NormPriority = 5, // Normal (non-daemon) priority 80 NearMaxPriority = 9, // High priority, used for VMThread 81 MaxPriority = 10, // Highest priority, used for WatcherThread 82 // ensures that VMThread doesn't starve profiler 83 CriticalPriority = 11 // Critical thread priority 84 }; 85 86 // Executable parameter flag for os::commit_memory() and 87 // os::commit_memory_or_exit(). 88 const bool ExecMem = true; 89 90 // Typedef for structured exception handling support 91 typedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread); 92 93 class os: AllStatic { 94 friend class VMStructs; 95 96 public: 97 enum { page_sizes_max = 9 }; // Size of _page_sizes array (8 plus a sentinel) 98 99 private: 100 static OSThread* _starting_thread; 101 static address _polling_page; 102 static volatile int32_t * _mem_serialize_page; 103 static uintptr_t _serialize_page_mask; 104 public: 105 static size_t _page_sizes[page_sizes_max]; 106 107 private: 108 static void init_page_sizes(size_t default_page_size) { 109 _page_sizes[0] = default_page_size; 110 _page_sizes[1] = 0; // sentinel 111 } 112 113 static char* pd_reserve_memory(size_t bytes, char* addr = 0, 114 size_t alignment_hint = 0); 115 static char* pd_attempt_reserve_memory_at(size_t bytes, char* addr); |