< prev index next >

src/os/windows/vm/os_windows.cpp

Print this page

        

*** 5882,5892 **** // do an allocation at an address selected by the OS to get a good one. const size_t large_allocation_size = os::large_page_size() * 4; char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), NULL, false); if (result == NULL) { if (VerboseInternalVMTests) { ! gclog_or_tty->print("Failed to allocate control block with size "SIZE_FORMAT". Skipping remainder of test.", large_allocation_size); } } else { os::release_memory_special(result, large_allocation_size); --- 5882,5892 ---- // do an allocation at an address selected by the OS to get a good one. const size_t large_allocation_size = os::large_page_size() * 4; char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), NULL, false); if (result == NULL) { if (VerboseInternalVMTests) { ! gclog_or_tty->print("Failed to allocate control block with size " SIZE_FORMAT ". Skipping remainder of test.", large_allocation_size); } } else { os::release_memory_special(result, large_allocation_size);
*** 5895,5913 **** const size_t expected_allocation_size = os::large_page_size(); char* expected_location = result + os::large_page_size(); char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), expected_location, false); if (actual_location == NULL) { if (VerboseInternalVMTests) { ! gclog_or_tty->print("Failed to allocate any memory at "PTR_FORMAT" size "SIZE_FORMAT". Skipping remainder of test.", expected_location, large_allocation_size); } } else { // release memory os::release_memory_special(actual_location, expected_allocation_size); // only now check, after releasing any memory to avoid any leaks. assert(actual_location == expected_location, ! err_msg("Failed to allocate memory at requested location "PTR_FORMAT" of size "SIZE_FORMAT", is "PTR_FORMAT" instead", expected_location, expected_allocation_size, actual_location)); } } // restore globals --- 5895,5913 ---- const size_t expected_allocation_size = os::large_page_size(); char* expected_location = result + os::large_page_size(); char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), expected_location, false); if (actual_location == NULL) { if (VerboseInternalVMTests) { ! gclog_or_tty->print("Failed to allocate any memory at " PTR_FORMAT " size " SIZE_FORMAT ". Skipping remainder of test.", expected_location, large_allocation_size); } } else { // release memory os::release_memory_special(actual_location, expected_allocation_size); // only now check, after releasing any memory to avoid any leaks. assert(actual_location == expected_location, ! err_msg("Failed to allocate memory at requested location " PTR_FORMAT " of size " SIZE_FORMAT ", is " PTR_FORMAT " instead", expected_location, expected_allocation_size, actual_location)); } } // restore globals
< prev index next >