< prev index next >

src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp

Print this page

        

@@ -716,11 +716,11 @@
     //
     // 15 bytes seems to be a (very) safe value for max instruction size.
     bool pc_is_near_addr =
       (pointer_delta((void*) addr, (void*) pc, sizeof(char)) < 15);
     bool instr_spans_page_boundary =
-      (align_size_down((intptr_t) pc ^ (intptr_t) addr,
+      (align_down((intptr_t) pc ^ (intptr_t) addr,
                        (intptr_t) page_size) > 0);
 
     if (pc == addr || (pc_is_near_addr && instr_spans_page_boundary)) {
       static volatile address last_addr =
         (address) os::non_memory_address_word();

@@ -728,11 +728,11 @@
       // In conservative mode, don't unguard unless the address is in the VM
       if (addr != last_addr &&
           (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) {
 
         // Set memory to RWX and retry
-        address page_start = align_ptr_down(addr, page_size);
+        address page_start = align_down(addr, page_size);
         bool res = os::protect_memory((char*) page_start, page_size,
                                       os::MEM_PROT_RWX);
 
         log_debug(os)("Execution protection violation "
                       "at " INTPTR_FORMAT
< prev index next >