< prev index next >

src/os/bsd/vm/os_bsd.inline.hpp

Print this page




  51   assert(uses_stack_guard_pages(), "sanity check");
  52 #if !defined(__FreeBSD__) || __FreeBSD__ < 5
  53   // Since FreeBSD 4 uses malloc() for allocating the thread stack
  54   // there is no need to do anything extra to allocate the guard pages
  55   return false;
  56 #else
  57   // FreeBSD 5+ uses mmap MAP_STACK for allocating the thread stacks.
  58   // Must 'allocate' them or guard pages are ignored.
  59   return true;
  60 #endif
  61 }
  62 
  63 
  64 // On Bsd, reservations are made on a page by page basis, nothing to do.
  65 inline void os::pd_split_reserved_memory(char *base, size_t size,
  66                                       size_t split, bool realloc) {
  67 }
  68 
  69 
  70 // Bang the shadow pages if they need to be touched to be mapped.
  71 inline void os::bang_stack_shadow_pages() {
  72 }
  73 
  74 inline void os::dll_unload(void *lib) {
  75   ::dlclose(lib);
  76 }
  77 
  78 inline const int os::default_file_open_flags() { return 0;}
  79 
  80 inline DIR* os::opendir(const char* dirname)
  81 {
  82   assert(dirname != NULL, "just checking");
  83   return ::opendir(dirname);
  84 }
  85 
  86 inline int os::readdir_buf_size(const char *path)
  87 {
  88   return NAME_MAX + sizeof(dirent) + 1;
  89 }
  90 
  91 inline jlong os::lseek(int fd, jlong offset, int whence) {




  51   assert(uses_stack_guard_pages(), "sanity check");
  52 #if !defined(__FreeBSD__) || __FreeBSD__ < 5
  53   // Since FreeBSD 4 uses malloc() for allocating the thread stack
  54   // there is no need to do anything extra to allocate the guard pages
  55   return false;
  56 #else
  57   // FreeBSD 5+ uses mmap MAP_STACK for allocating the thread stacks.
  58   // Must 'allocate' them or guard pages are ignored.
  59   return true;
  60 #endif
  61 }
  62 
  63 
  64 // On Bsd, reservations are made on a page by page basis, nothing to do.
  65 inline void os::pd_split_reserved_memory(char *base, size_t size,
  66                                       size_t split, bool realloc) {
  67 }
  68 
  69 
  70 // Bang the shadow pages if they need to be touched to be mapped.
  71 inline void os::map_stack_shadow_pages() {
  72 }
  73 
  74 inline void os::dll_unload(void *lib) {
  75   ::dlclose(lib);
  76 }
  77 
  78 inline const int os::default_file_open_flags() { return 0;}
  79 
  80 inline DIR* os::opendir(const char* dirname)
  81 {
  82   assert(dirname != NULL, "just checking");
  83   return ::opendir(dirname);
  84 }
  85 
  86 inline int os::readdir_buf_size(const char *path)
  87 {
  88   return NAME_MAX + sizeof(dirent) + 1;
  89 }
  90 
  91 inline jlong os::lseek(int fd, jlong offset, int whence) {


< prev index next >