3909 |
3909 |
3910 static jint initSock(); |
3910 static jint initSock(); |
3911 |
3911 |
3912 // this is called _after_ the global arguments have been parsed |
3912 // this is called _after_ the global arguments have been parsed |
3913 jint os::init_2(void) { |
3913 jint os::init_2(void) { |
3914 // Allocate a single page and mark it as readable for safepoint polling |
|
3915 address polling_page = (address)VirtualAlloc(NULL, os::vm_page_size(), MEM_RESERVE, PAGE_READONLY); |
|
3916 guarantee(polling_page != NULL, "Reserve Failed for polling page"); |
|
3917 |
|
3918 address return_page = (address)VirtualAlloc(polling_page, os::vm_page_size(), MEM_COMMIT, PAGE_READONLY); |
|
3919 guarantee(return_page != NULL, "Commit Failed for polling page"); |
|
3920 |
|
3921 os::set_polling_page(polling_page); |
|
3922 log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(polling_page)); |
|
3923 |
|
3924 if (!UseMembar) { |
|
3925 address mem_serialize_page = (address)VirtualAlloc(NULL, os::vm_page_size(), MEM_RESERVE, PAGE_READWRITE); |
|
3926 guarantee(mem_serialize_page != NULL, "Reserve Failed for memory serialize page"); |
|
3927 |
|
3928 return_page = (address)VirtualAlloc(mem_serialize_page, os::vm_page_size(), MEM_COMMIT, PAGE_READWRITE); |
|
3929 guarantee(return_page != NULL, "Commit Failed for memory serialize page"); |
|
3930 |
|
3931 os::set_memory_serialize_page(mem_serialize_page); |
|
3932 log_info(os)("Memory Serialize Page address: " INTPTR_FORMAT, p2i(mem_serialize_page)); |
|
3933 } |
|
3934 |
|
3935 // Setup Windows Exceptions |
3914 // Setup Windows Exceptions |
3936 |
3915 |
3937 // for debugging float code generation bugs |
3916 // for debugging float code generation bugs |
3938 if (ForceFloatExceptions) { |
3917 if (ForceFloatExceptions) { |
3939 #ifndef _WIN64 |
3918 #ifndef _WIN64 |