< prev index next >

src/hotspot/share/gc/parallel/psVirtualspace.hpp

8221260: Initialize more class members on construction, remove some unused ones
Reviewed-by:

46   // Committed area                                                                                                        
47   char* _committed_low_addr;                                                                                               
48   char* _committed_high_addr;                                                                                              
49 
50   // The entire space has been committed and pinned in memory, no                                                          
51   // os::commit_memory() or os::uncommit_memory().                                                                         
52   bool _special;                                                                                                           
53 
54   // Convenience wrapper.                                                                                                  
55   inline static size_t pointer_delta(const char* left, const char* right);                                                 
56 
57  public:                                                                                                                   
58   PSVirtualSpace(ReservedSpace rs, size_t alignment);                                                                      
59   PSVirtualSpace(ReservedSpace rs);                                                                                        
60 
61   ~PSVirtualSpace();                                                                                                       
62 
63   // Eventually all instances should be created with the above 1- or 2-arg                                                 
64   // constructors.  Then the 1st constructor below should become protected and                                             
65   // the 2nd ctor and initialize() removed.                                                                                
66   PSVirtualSpace(size_t alignment): _alignment(alignment) { }                                                              
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
                                                                                                                           
67   PSVirtualSpace();                                                                                                        
68   bool initialize(ReservedSpace rs, size_t commit_size);                                                                   
69 
70   bool contains(void* p)      const;                                                                                       
71 
72   // Accessors (all sizes are bytes).                                                                                      
73   size_t alignment()          const { return _alignment; }                                                                 
74   char* reserved_low_addr()   const { return _reserved_low_addr; }                                                         
75   char* reserved_high_addr()  const { return _reserved_high_addr; }                                                        
76   char* committed_low_addr()  const { return _committed_low_addr; }                                                        
77   char* committed_high_addr() const { return _committed_high_addr; }                                                       
78   bool  special()             const { return _special; }                                                                   
79 
80   inline size_t committed_size()   const;                                                                                  
81   inline size_t reserved_size()    const;                                                                                  
82   inline size_t uncommitted_size() const;                                                                                  
83 
84   // Operations.                                                                                                           
85   inline  void   set_reserved(char* low_addr, char* high_addr, bool special);                                              

46   // Committed area
47   char* _committed_low_addr;
48   char* _committed_high_addr;
49 
50   // The entire space has been committed and pinned in memory, no
51   // os::commit_memory() or os::uncommit_memory().
52   bool _special;
53 
54   // Convenience wrapper.
55   inline static size_t pointer_delta(const char* left, const char* right);
56 
57  public:
58   PSVirtualSpace(ReservedSpace rs, size_t alignment);
59   PSVirtualSpace(ReservedSpace rs);
60 
61   ~PSVirtualSpace();
62 
63   // Eventually all instances should be created with the above 1- or 2-arg
64   // constructors.  Then the 1st constructor below should become protected and
65   // the 2nd ctor and initialize() removed.
66   PSVirtualSpace(size_t alignment):
67     _alignment(alignment),
68     _reserved_low_addr(NULL),
69     _reserved_high_addr(NULL),
70     _committed_low_addr(NULL),
71     _committed_high_addr(NULL),
72     _special(false) {
73   }
74   PSVirtualSpace();
75   bool initialize(ReservedSpace rs, size_t commit_size);
76 
77   bool contains(void* p)      const;
78 
79   // Accessors (all sizes are bytes).
80   size_t alignment()          const { return _alignment; }
81   char* reserved_low_addr()   const { return _reserved_low_addr; }
82   char* reserved_high_addr()  const { return _reserved_high_addr; }
83   char* committed_low_addr()  const { return _committed_low_addr; }
84   char* committed_high_addr() const { return _committed_high_addr; }
85   bool  special()             const { return _special; }
86 
87   inline size_t committed_size()   const;
88   inline size_t reserved_size()    const;
89   inline size_t uncommitted_size() const;
90 
91   // Operations.
92   inline  void   set_reserved(char* low_addr, char* high_addr, bool special);
< prev index next >