< prev index next >

hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp

Print this page




 709 #ifdef _LP64
 710   return true;
 711 #else
 712   if (bytes < 2 * G) {
 713     return true;
 714   }
 715 
 716   char* addr = reserve_memory(bytes, NULL);
 717 
 718   if (addr != NULL) {
 719     release_memory(addr, bytes);
 720   }
 721 
 722   return addr != NULL;
 723 #endif // _LP64
 724 }
 725 
 726 ///////////////////////////////////////////////////////////////////////////////
 727 // thread stack
 728 
 729 size_t os::Linux::min_stack_allowed  = 128 * K;


 730 
 731 // return default stack size for thr_type
 732 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
 733   // default stack size (compiler thread needs larger stack)
 734   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
 735   return s;
 736 }
 737 
 738 size_t os::Linux::default_guard_size(os::ThreadType thr_type) {
 739   // Creating guard page is very expensive. Java thread has HotSpot
 740   // guard page, only enable glibc guard page for non-Java threads.
 741   return (thr_type == java_thread ? 0 : page_size());
 742 }
 743 
 744 #ifndef PRODUCT
 745 void os::verify_stack_alignment() {
 746 }
 747 #endif
 748 
 749 int os::extra_bang_size_in_bytes() {
 750   // SPARC does not require the additional stack bang.
 751   return 0;
 752 }


 709 #ifdef _LP64
 710   return true;
 711 #else
 712   if (bytes < 2 * G) {
 713     return true;
 714   }
 715 
 716   char* addr = reserve_memory(bytes, NULL);
 717 
 718   if (addr != NULL) {
 719     release_memory(addr, bytes);
 720   }
 721 
 722   return addr != NULL;
 723 #endif // _LP64
 724 }
 725 
 726 ///////////////////////////////////////////////////////////////////////////////
 727 // thread stack
 728 
 729 size_t os::Posix::_compiler_thread_min_stack_allowed = 128 * K;
 730 size_t os::Posix::_java_thread_min_stack_allowed = 128 * K;
 731 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 128 * K;
 732 
 733 // return default stack size for thr_type
 734 size_t os::Posix::default_stack_size(os::ThreadType thr_type) {
 735   // default stack size (compiler thread needs larger stack)
 736   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
 737   return s;
 738 }
 739 
 740 size_t os::Linux::default_guard_size(os::ThreadType thr_type) {
 741   // Creating guard page is very expensive. Java thread has HotSpot
 742   // guard page, only enable glibc guard page for non-Java threads.
 743   return (thr_type == java_thread ? 0 : page_size());
 744 }
 745 
 746 #ifndef PRODUCT
 747 void os::verify_stack_alignment() {
 748 }
 749 #endif
 750 
 751 int os::extra_bang_size_in_bytes() {
 752   // SPARC does not require the additional stack bang.
 753   return 0;
 754 }
< prev index next >