< prev index next >

src/share/vm/runtime/virtualspace.hpp

Print this page
rev 7386 : 8064457: Introduce compressed oops mode disjoint base and improve compressed heap handling.

*** 29,65 **** // ReservedSpace is a data structure for reserving a contiguous address range. class ReservedSpace VALUE_OBJ_CLASS_SPEC { friend class VMStructs; ! private: char* _base; size_t _size; size_t _noaccess_prefix; size_t _alignment; bool _special; bool _executable; // ReservedSpace 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, bool executable); - - protected: // Create protection page at the beginning of the space. ! void protect_noaccess_prefix(const size_t size); public: // Constructor ReservedSpace(); ReservedSpace(size_t size); ReservedSpace(size_t size, size_t alignment, bool large, ! char* requested_address = NULL, ! 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; } --- 29,63 ---- // ReservedSpace is a data structure for reserving a contiguous address range. class ReservedSpace VALUE_OBJ_CLASS_SPEC { friend class VMStructs; ! protected: char* _base; size_t _size; size_t _noaccess_prefix; size_t _alignment; bool _special; + private: bool _executable; // ReservedSpace ReservedSpace(char* base, size_t size, size_t alignment, bool special, bool executable); + protected: void initialize(size_t size, size_t alignment, bool large, char* requested_address, bool executable); // Create protection page at the beginning of the space. ! void establish_noaccess_prefix(); public: // Constructor ReservedSpace(); ReservedSpace(size_t size); ReservedSpace(size_t size, size_t alignment, bool large, ! char* requested_address = NULL); ReservedSpace(size_t size, size_t alignment, bool large, bool executable); // Accessors char* base() const { return _base; } size_t size() const { return _size; }
*** 96,111 **** ReservedSpace ReservedSpace::last_part(size_t partition_size) { return last_part(partition_size, alignment()); } ! // Class encapsulating behavior specific of memory space reserved for Java heap class ReservedHeapSpace : public ReservedSpace { ! public: ! // Constructor ! ReservedHeapSpace(size_t size, size_t forced_base_alignment, ! bool large, char* requested_address); }; // Class encapsulating behavior specific memory space for Code class ReservedCodeSpace : public ReservedSpace { public: --- 94,114 ---- ReservedSpace ReservedSpace::last_part(size_t partition_size) { return last_part(partition_size, alignment()); } ! // Class encapsulating behavior specific of memory space reserved for Java heap. class ReservedHeapSpace : public ReservedSpace { ! private: ! void try_reserve_heap(size_t size, size_t alignment, bool large, char* requested_address); ! void initialize_compressed_heap(size_t size, size_t alignment, bool large); ! public: ! // Constructor. Tries to find a heap that is good for compressed oops. ! ReservedHeapSpace(size_t size, size_t forced_base_alignment, bool large); ! // Returns the base to be used for compression, i.e. so that null can be encoded safely and ! // implicit null checks can work. ! char *compressed_oop_base() { return _base - _noaccess_prefix; } }; // Class encapsulating behavior specific memory space for Code class ReservedCodeSpace : public ReservedSpace { public:
< prev index next >