135 bool executable, const char* mesg); 136 static void pd_commit_memory_or_exit(char* addr, size_t size, 137 size_t alignment_hint, 138 bool executable, const char* mesg); 139 static bool pd_uncommit_memory(char* addr, size_t bytes); 140 static bool pd_release_memory(char* addr, size_t bytes); 141 142 static char* pd_map_memory(int fd, const char* file_name, size_t file_offset, 143 char *addr, size_t bytes, bool read_only = false, 144 bool allow_exec = false); 145 static char* pd_remap_memory(int fd, const char* file_name, size_t file_offset, 146 char *addr, size_t bytes, bool read_only, 147 bool allow_exec); 148 static bool pd_unmap_memory(char *addr, size_t bytes); 149 static void pd_free_memory(char *addr, size_t bytes, size_t alignment_hint); 150 static void pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint); 151 152 static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); 153 154 static void initialize_initial_active_processor_count(); 155 public: 156 static void init(void); // Called before command line parsing 157 static void init_before_ergo(void); // Called after command line parsing 158 // before VM ergonomics processing. 159 static jint init_2(void); // Called after command line parsing 160 // and VM ergonomics processing 161 static void init_globals(void) { // Called from init_globals() in init.cpp 162 init_globals_ext(); 163 } 164 165 // File names are case-insensitive on windows only 166 // Override me as needed 167 static int file_name_strcmp(const char* s1, const char* s2); 168 169 // get/unset environment variable 170 static bool getenv(const char* name, char* buffer, int len); 171 static bool unsetenv(const char* name); 172 173 static bool have_special_privileges(); 174 175 static jlong javaTimeMillis(); 176 static jlong javaTimeNanos(); | 135 bool executable, const char* mesg); 136 static void pd_commit_memory_or_exit(char* addr, size_t size, 137 size_t alignment_hint, 138 bool executable, const char* mesg); 139 static bool pd_uncommit_memory(char* addr, size_t bytes); 140 static bool pd_release_memory(char* addr, size_t bytes); 141 142 static char* pd_map_memory(int fd, const char* file_name, size_t file_offset, 143 char *addr, size_t bytes, bool read_only = false, 144 bool allow_exec = false); 145 static char* pd_remap_memory(int fd, const char* file_name, size_t file_offset, 146 char *addr, size_t bytes, bool read_only, 147 bool allow_exec); 148 static bool pd_unmap_memory(char *addr, size_t bytes); 149 static void pd_free_memory(char *addr, size_t bytes, size_t alignment_hint); 150 static void pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint); 151 152 static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); 153 154 static void initialize_initial_active_processor_count(); 155 156 LINUX_ONLY(static void pd_init_container_support();) 157 158 public: 159 static void init(void); // Called before command line parsing 160 161 static void init_container_support() { // Called during command line parsing. 162 LINUX_ONLY(pd_init_container_support();) 163 } 164 165 static void init_before_ergo(void); // Called after command line parsing 166 // before VM ergonomics processing. 167 static jint init_2(void); // Called after command line parsing 168 // and VM ergonomics processing 169 static void init_globals(void) { // Called from init_globals() in init.cpp 170 init_globals_ext(); 171 } 172 173 // File names are case-insensitive on windows only 174 // Override me as needed 175 static int file_name_strcmp(const char* s1, const char* s2); 176 177 // get/unset environment variable 178 static bool getenv(const char* name, char* buffer, int len); 179 static bool unsetenv(const char* name); 180 181 static bool have_special_privileges(); 182 183 static jlong javaTimeMillis(); 184 static jlong javaTimeNanos(); |