< prev index next >

src/os/windows/vm/os_windows.inline.hpp

Print this page




  49   return false;
  50 }
  51 
  52 inline bool os::uses_stack_guard_pages() {
  53   return true;
  54 }
  55 
  56 inline bool os::allocate_stack_guard_pages() {
  57   return true;
  58 }
  59 
  60 inline int os::readdir_buf_size(const char *path)
  61 {
  62   /* As Windows doesn't use the directory entry buffer passed to
  63      os::readdir() this can be as short as possible */
  64 
  65   return 1;
  66 }
  67 
  68 // Bang the shadow pages if they need to be touched to be mapped.
  69 inline void os::bang_stack_shadow_pages() {
  70   // Write to each page of our new frame to force OS mapping.
  71   // If we decrement stack pointer more than one page
  72   // the OS may not map an intervening page into our space
  73   // and may fault on a memory access to interior of our frame.
  74   address sp = current_stack_pointer();
  75   for (size_t pages = 1; pages <= (JavaThread::stack_shadow_zone_size() / os::vm_page_size()); pages++) {
  76     *((int *)(sp - (pages * vm_page_size()))) = 0;
  77   }
  78 }
  79 
  80 inline bool os::numa_has_static_binding()   { return true;   }
  81 inline bool os::numa_has_group_homing()     { return false;  }
  82 
  83 inline size_t os::read(int fd, void *buf, unsigned int nBytes) {
  84   return ::read(fd, buf, nBytes);
  85 }
  86 
  87 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
  88   return ::read(fd, buf, nBytes);
  89 }


  49   return false;
  50 }
  51 
  52 inline bool os::uses_stack_guard_pages() {
  53   return true;
  54 }
  55 
  56 inline bool os::allocate_stack_guard_pages() {
  57   return true;
  58 }
  59 
  60 inline int os::readdir_buf_size(const char *path)
  61 {
  62   /* As Windows doesn't use the directory entry buffer passed to
  63      os::readdir() this can be as short as possible */
  64 
  65   return 1;
  66 }
  67 
  68 // Bang the shadow pages if they need to be touched to be mapped.
  69 inline void os::map_stack_shadow_pages() {
  70   // Write to each page of our new frame to force OS mapping.
  71   // If we decrement stack pointer more than one page
  72   // the OS may not map an intervening page into our space
  73   // and may fault on a memory access to interior of our frame.
  74   address sp = current_stack_pointer();
  75   for (size_t pages = 1; pages <= (JavaThread::stack_shadow_zone_size() / os::vm_page_size()); pages++) {
  76     *((int *)(sp - (pages * vm_page_size()))) = 0;
  77   }
  78 }
  79 
  80 inline bool os::numa_has_static_binding()   { return true;   }
  81 inline bool os::numa_has_group_homing()     { return false;  }
  82 
  83 inline size_t os::read(int fd, void *buf, unsigned int nBytes) {
  84   return ::read(fd, buf, nBytes);
  85 }
  86 
  87 inline size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
  88   return ::read(fd, buf, nBytes);
  89 }
< prev index next >