< prev index next >

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

Print this page




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef OS_BSD_OS_BSD_INLINE_HPP
  26 #define OS_BSD_OS_BSD_INLINE_HPP
  27 
  28 #include "runtime/os.hpp"
  29 #include "os_posix.inline.hpp"
  30 
  31 // System includes
  32 
  33 #include <unistd.h>
  34 #include <sys/socket.h>
  35 #include <poll.h>
  36 #include <netdb.h>
  37 





  38 inline bool os::uses_stack_guard_pages() {
  39   return true;
  40 }
  41 
  42 inline bool os::must_commit_stack_guard_pages() {
  43   assert(uses_stack_guard_pages(), "sanity check");
  44 #if !defined(__FreeBSD__) || __FreeBSD__ < 5
  45   // Since FreeBSD 4 uses malloc() for allocating the thread stack
  46   // there is no need to do anything extra to allocate the guard pages
  47   return false;
  48 #else
  49   // FreeBSD 5+ uses mmap MAP_STACK for allocating the thread stacks.
  50   // Must 'allocate' them or guard pages are ignored.
  51   return true;
  52 #endif
  53 }
  54 
  55 
  56 // On Bsd, reservations are made on a page by page basis, nothing to do.
  57 inline void os::pd_split_reserved_memory(char *base, size_t size,




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef OS_BSD_OS_BSD_INLINE_HPP
  26 #define OS_BSD_OS_BSD_INLINE_HPP
  27 
  28 #include "runtime/os.hpp"
  29 #include "os_posix.inline.hpp"
  30 
  31 // System includes
  32 
  33 #include <unistd.h>
  34 #include <sys/socket.h>
  35 #include <poll.h>
  36 #include <netdb.h>
  37 
  38 // File names are case-insensitive on windows only
  39 inline int os::file_name_strncmp(const char* s1, const char* s2, size_t num) {
  40   return strncmp(s1, s2, num);
  41 }
  42 
  43 inline bool os::uses_stack_guard_pages() {
  44   return true;
  45 }
  46 
  47 inline bool os::must_commit_stack_guard_pages() {
  48   assert(uses_stack_guard_pages(), "sanity check");
  49 #if !defined(__FreeBSD__) || __FreeBSD__ < 5
  50   // Since FreeBSD 4 uses malloc() for allocating the thread stack
  51   // there is no need to do anything extra to allocate the guard pages
  52   return false;
  53 #else
  54   // FreeBSD 5+ uses mmap MAP_STACK for allocating the thread stacks.
  55   // Must 'allocate' them or guard pages are ignored.
  56   return true;
  57 #endif
  58 }
  59 
  60 
  61 // On Bsd, reservations are made on a page by page basis, nothing to do.
  62 inline void os::pd_split_reserved_memory(char *base, size_t size,


< prev index next >