1.1 --- a/src/share/vm/runtime/virtualspace.hpp Mon Mar 23 10:42:20 2009 -0400 1.2 +++ b/src/share/vm/runtime/virtualspace.hpp Wed Mar 25 14:19:20 2009 -0400 1.3 @@ -32,12 +32,15 @@ 1.4 size_t _noaccess_prefix; 1.5 size_t _alignment; 1.6 bool _special; 1.7 + bool _executable; 1.8 1.9 // ReservedSpace 1.10 - ReservedSpace(char* base, size_t size, size_t alignment, bool special); 1.11 + ReservedSpace(char* base, size_t size, size_t alignment, bool special, 1.12 + bool executable); 1.13 void initialize(size_t size, size_t alignment, bool large, 1.14 char* requested_address, 1.15 - const size_t noaccess_prefix); 1.16 + const size_t noaccess_prefix, 1.17 + bool executable); 1.18 1.19 // Release parts of an already-reserved memory region [addr, addr + len) to 1.20 // get a new region that has "compound alignment." Return the start of the 1.21 @@ -75,16 +78,16 @@ 1.22 const size_t suffix_size, const size_t suffix_align, 1.23 char* requested_address, 1.24 const size_t noaccess_prefix = 0); 1.25 + ReservedSpace(size_t size, size_t alignment, bool large, bool executable); 1.26 1.27 // Accessors 1.28 - char* base() const { return _base; } 1.29 - size_t size() const { return _size; } 1.30 - size_t alignment() const { return _alignment; } 1.31 - bool special() const { return _special; } 1.32 - 1.33 - size_t noaccess_prefix() const { return _noaccess_prefix; } 1.34 - 1.35 - bool is_reserved() const { return _base != NULL; } 1.36 + char* base() const { return _base; } 1.37 + size_t size() const { return _size; } 1.38 + size_t alignment() const { return _alignment; } 1.39 + bool special() const { return _special; } 1.40 + bool executable() const { return _executable; } 1.41 + size_t noaccess_prefix() const { return _noaccess_prefix; } 1.42 + bool is_reserved() const { return _base != NULL; } 1.43 void release(); 1.44 1.45 // Splitting 1.46 @@ -126,6 +129,13 @@ 1.47 char* requested_address); 1.48 }; 1.49 1.50 +// Class encapsulating behavior specific memory space for Code 1.51 +class ReservedCodeSpace : public ReservedSpace { 1.52 + public: 1.53 + // Constructor 1.54 + ReservedCodeSpace(size_t r_size, size_t rs_align, bool large); 1.55 +}; 1.56 + 1.57 // VirtualSpace is data structure for committing a previously reserved address range in smaller chunks. 1.58 1.59 class VirtualSpace VALUE_OBJ_CLASS_SPEC { 1.60 @@ -143,6 +153,9 @@ 1.61 // os::commit_memory() or os::uncommit_memory(). 1.62 bool _special; 1.63 1.64 + // Need to know if commit should be executable. 1.65 + bool _executable; 1.66 + 1.67 // MPSS Support 1.68 // Each virtualspace region has a lower, middle, and upper region. 1.69 // Each region has an end boundary and a high pointer which is the