6541756: Reduce executable C-heap

Add executable parameters to reserve_memory and commit_memory to reduce executable memory to only the Code Heap.

Reviewed-by: xlu, kvn, acorn
This commit is contained in:
Coleen Phillimore 2009-03-25 14:19:20 -04:00
parent 472349069b
commit cec3a034d1
7 changed files with 122 additions and 58 deletions

View file

@ -32,12 +32,15 @@ class ReservedSpace VALUE_OBJ_CLASS_SPEC {
size_t _noaccess_prefix;
size_t _alignment;
bool _special;
bool _executable;
// ReservedSpace
ReservedSpace(char* base, size_t size, size_t alignment, bool special);
ReservedSpace(char* base, size_t size, size_t alignment, bool special,
bool executable);
void initialize(size_t size, size_t alignment, bool large,
char* requested_address,
const size_t noaccess_prefix);
const size_t noaccess_prefix,
bool executable);
// Release parts of an already-reserved memory region [addr, addr + len) to
// get a new region that has "compound alignment." Return the start of the
@ -75,16 +78,16 @@ class ReservedSpace VALUE_OBJ_CLASS_SPEC {
const size_t suffix_size, const size_t suffix_align,
char* requested_address,
const size_t noaccess_prefix = 0);
ReservedSpace(size_t size, size_t alignment, bool large, bool executable);
// Accessors
char* base() const { return _base; }
size_t size() const { return _size; }
size_t alignment() const { return _alignment; }
bool special() const { return _special; }
size_t noaccess_prefix() const { return _noaccess_prefix; }
bool is_reserved() const { return _base != NULL; }
char* base() const { return _base; }
size_t size() const { return _size; }
size_t alignment() const { return _alignment; }
bool special() const { return _special; }
bool executable() const { return _executable; }
size_t noaccess_prefix() const { return _noaccess_prefix; }
bool is_reserved() const { return _base != NULL; }
void release();
// Splitting
@ -126,6 +129,13 @@ public:
char* requested_address);
};
// Class encapsulating behavior specific memory space for Code
class ReservedCodeSpace : public ReservedSpace {
public:
// Constructor
ReservedCodeSpace(size_t r_size, size_t rs_align, bool large);
};
// VirtualSpace is data structure for committing a previously reserved address range in smaller chunks.
class VirtualSpace VALUE_OBJ_CLASS_SPEC {
@ -143,6 +153,9 @@ class VirtualSpace VALUE_OBJ_CLASS_SPEC {
// os::commit_memory() or os::uncommit_memory().
bool _special;
// Need to know if commit should be executable.
bool _executable;
// MPSS Support
// Each virtualspace region has a lower, middle, and upper region.
// Each region has an end boundary and a high pointer which is the