< prev index next >

src/hotspot/share/memory/metaspace/virtualSpaceNode.hpp

Print this page




  43   friend class VirtualSpaceList;
  44 
  45   // Link to next VirtualSpaceNode
  46   VirtualSpaceNode* _next;
  47 
  48   // Whether this node is contained in class or metaspace.
  49   const bool _is_class;
  50 
  51   // total in the VirtualSpace
  52   ReservedSpace _rs;
  53   VirtualSpace _virtual_space;
  54   MetaWord* _top;
  55   // count of chunks contained in this VirtualSpace
  56   uintx _container_count;
  57 
  58   OccupancyMap* _occupancy_map;
  59 
  60   // Convenience functions to access the _virtual_space
  61   char* low()  const { return virtual_space()->low(); }
  62   char* high() const { return virtual_space()->high(); }
  63   char* low_boundary()  const { return virtual_space()->low_boundary(); }
  64   char* high_boundary() const { return virtual_space()->high_boundary(); }
  65 
  66   // The first Metachunk will be allocated at the bottom of the
  67   // VirtualSpace
  68   Metachunk* first_chunk() { return (Metachunk*) bottom(); }
  69 
  70   // Committed but unused space in the virtual space
  71   size_t free_words_in_vs() const;
  72 
  73   // True if this node belongs to class metaspace.
  74   bool is_class() const { return _is_class; }
  75 
  76   // Helper function for take_from_committed: allocate padding chunks
  77   // until top is at the given address.
  78   void allocate_padding_chunks_until_top_is_at(MetaWord* target_top);
  79 
  80  public:
  81 
  82   VirtualSpaceNode(bool is_class, size_t byte_size);
  83   VirtualSpaceNode(bool is_class, ReservedSpace rs) :
  84     _next(NULL), _is_class(is_class), _rs(rs), _top(NULL), _container_count(0), _occupancy_map(NULL) {}




  43   friend class VirtualSpaceList;
  44 
  45   // Link to next VirtualSpaceNode
  46   VirtualSpaceNode* _next;
  47 
  48   // Whether this node is contained in class or metaspace.
  49   const bool _is_class;
  50 
  51   // total in the VirtualSpace
  52   ReservedSpace _rs;
  53   VirtualSpace _virtual_space;
  54   MetaWord* _top;
  55   // count of chunks contained in this VirtualSpace
  56   uintx _container_count;
  57 
  58   OccupancyMap* _occupancy_map;
  59 
  60   // Convenience functions to access the _virtual_space
  61   char* low()  const { return virtual_space()->low(); }
  62   char* high() const { return virtual_space()->high(); }


  63 
  64   // The first Metachunk will be allocated at the bottom of the
  65   // VirtualSpace
  66   Metachunk* first_chunk() { return (Metachunk*) bottom(); }
  67 
  68   // Committed but unused space in the virtual space
  69   size_t free_words_in_vs() const;
  70 
  71   // True if this node belongs to class metaspace.
  72   bool is_class() const { return _is_class; }
  73 
  74   // Helper function for take_from_committed: allocate padding chunks
  75   // until top is at the given address.
  76   void allocate_padding_chunks_until_top_is_at(MetaWord* target_top);
  77 
  78  public:
  79 
  80   VirtualSpaceNode(bool is_class, size_t byte_size);
  81   VirtualSpaceNode(bool is_class, ReservedSpace rs) :
  82     _next(NULL), _is_class(is_class), _rs(rs), _top(NULL), _container_count(0), _occupancy_map(NULL) {}


< prev index next >