< prev index next >

src/hotspot/share/gc/z/zPhysicalMemory.hpp

Print this page




  68 
  69   uint32_t nsegments() const;
  70   const ZPhysicalMemorySegment& segment(uint32_t index) const;
  71 
  72   void add_segments(const ZPhysicalMemory& from);
  73   void transfer_segments(ZPhysicalMemory& from);
  74 
  75   void add_segment(const ZPhysicalMemorySegment& segment);
  76   bool commit_segment(uint32_t index, size_t size);
  77   bool uncommit_segment(uint32_t index, size_t size);
  78 
  79   ZPhysicalMemory split(size_t size);
  80   ZPhysicalMemory split_committed();
  81 };
  82 
  83 class ZPhysicalMemoryManager {
  84 private:
  85   ZPhysicalMemoryBacking _backing;
  86   ZMemoryManager         _manager;
  87 
  88   void nmt_commit(const ZPhysicalMemory& pmem, uintptr_t offset) const;
  89   void nmt_uncommit(const ZPhysicalMemory& pmem, uintptr_t offset) const;
  90 
  91   void pretouch_view(uintptr_t addr, size_t size) const;
  92   bool map_view(const ZPhysicalMemory& pmem, uintptr_t addr) const;
  93   void unmap_view(const ZPhysicalMemory& pmem, uintptr_t addr) const;
  94 
  95 public:
  96   ZPhysicalMemoryManager(size_t max_capacity);
  97 
  98   bool is_initialized() const;
  99 
 100   void warn_commit_limits(size_t max_capacity) const;
 101   bool should_enable_uncommit(size_t min_capacity, size_t max_capacity);
 102 
 103   void alloc(ZPhysicalMemory& pmem, size_t size);
 104   void free(const ZPhysicalMemory& pmem);
 105 
 106   bool commit(ZPhysicalMemory& pmem);
 107   bool uncommit(ZPhysicalMemory& pmem);
 108 
 109   void pretouch(uintptr_t offset, size_t size) const;
 110 
 111   bool map(const ZPhysicalMemory& pmem, uintptr_t offset) const;
 112   void unmap(const ZPhysicalMemory& pmem, uintptr_t offset) const;
 113 
 114   void debug_map(const ZPhysicalMemory& pmem, uintptr_t offset) const;
 115   void debug_unmap(const ZPhysicalMemory& pmem, uintptr_t offset) const;
 116 };
 117 
 118 #endif // SHARE_GC_Z_ZPHYSICALMEMORY_HPP


  68 
  69   uint32_t nsegments() const;
  70   const ZPhysicalMemorySegment& segment(uint32_t index) const;
  71 
  72   void add_segments(const ZPhysicalMemory& from);
  73   void transfer_segments(ZPhysicalMemory& from);
  74 
  75   void add_segment(const ZPhysicalMemorySegment& segment);
  76   bool commit_segment(uint32_t index, size_t size);
  77   bool uncommit_segment(uint32_t index, size_t size);
  78 
  79   ZPhysicalMemory split(size_t size);
  80   ZPhysicalMemory split_committed();
  81 };
  82 
  83 class ZPhysicalMemoryManager {
  84 private:
  85   ZPhysicalMemoryBacking _backing;
  86   ZMemoryManager         _manager;
  87 
  88   void nmt_commit(uintptr_t offset, size_t size) const;
  89   void nmt_uncommit(uintptr_t offset, size_t size) const;
  90 
  91   void pretouch_view(uintptr_t addr, size_t size) const;
  92   bool map_view(uintptr_t addr, const ZPhysicalMemory& pmem) const;
  93   void unmap_view(uintptr_t addr, size_t size) const;
  94 
  95 public:
  96   ZPhysicalMemoryManager(size_t max_capacity);
  97 
  98   bool is_initialized() const;
  99 
 100   void warn_commit_limits(size_t max_capacity) const;
 101   bool should_enable_uncommit(size_t min_capacity, size_t max_capacity);
 102 
 103   void alloc(ZPhysicalMemory& pmem, size_t size);
 104   void free(const ZPhysicalMemory& pmem);
 105 
 106   bool commit(ZPhysicalMemory& pmem);
 107   bool uncommit(ZPhysicalMemory& pmem);
 108 
 109   void pretouch(uintptr_t offset, size_t size) const;
 110 
 111   bool map(uintptr_t offset, const ZPhysicalMemory& pmem) const;
 112   void unmap(uintptr_t offset, size_t size) const;
 113 
 114   void debug_map(uintptr_t offset, const ZPhysicalMemory& pmem) const;
 115   void debug_unmap(uintptr_t offset, size_t size) const;
 116 };
 117 
 118 #endif // SHARE_GC_Z_ZPHYSICALMEMORY_HPP
< prev index next >