--- old/share/memory/virtualspace.hpp 2018-06-12 04:14:37.459190871 -0700 +++ new/share/memory/virtualspace.hpp 2018-06-12 04:14:37.423190870 -0700 @@ -33,11 +33,16 @@ friend class VMStructs; protected: char* _base; + char* _nvdimm_base; + char* _nvdimm_base_nv; size_t _size; + size_t _dram_size; + size_t _nvdimm_size; size_t _noaccess_prefix; size_t _alignment; bool _special; int _fd_for_heap; + int _fd_for_nvdimm; private: bool _executable; @@ -63,7 +68,11 @@ // Accessors char* base() const { return _base; } + char* nvdimm_base() const { return _nvdimm_base; } + int nvdimm_fd() const { return _fd_for_nvdimm; } + void setup_fd(int fd) {_fd_for_nvdimm = fd; } size_t size() const { return _size; } + size_t nvdimm_size() const { return _nvdimm_size; } char* end() const { return _base + _size; } size_t alignment() const { return _alignment; } bool special() const { return _special; } @@ -114,6 +123,7 @@ void initialize_compressed_heap(const size_t size, size_t alignment, bool large); // Create protection page at the beginning of the space. void establish_noaccess_prefix(); + void initialize_g1gc_nvdimm_dram_sizes(size_t size, size_t alignment); public: // Constructor. Tries to find a heap that is good for compressed oops. // heap_allocation_directory is the path to the backing memory for Java heap. When set, Java heap will be allocated