hotspot/src/share/vm/gc_interface/collectedHeap.hpp
changeset 360 21d113ecbf6a
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
child 1374 4c24294029a9
equal deleted inserted replaced
357:f4edb0d9f109 360:21d113ecbf6a
    51   MemRegion _reserved;
    51   MemRegion _reserved;
    52   BarrierSet* _barrier_set;
    52   BarrierSet* _barrier_set;
    53   bool _is_gc_active;
    53   bool _is_gc_active;
    54   unsigned int _total_collections;          // ... started
    54   unsigned int _total_collections;          // ... started
    55   unsigned int _total_full_collections;     // ... started
    55   unsigned int _total_full_collections;     // ... started
    56   size_t _max_heap_capacity;
       
    57   NOT_PRODUCT(volatile size_t _promotion_failure_alot_count;)
    56   NOT_PRODUCT(volatile size_t _promotion_failure_alot_count;)
    58   NOT_PRODUCT(volatile size_t _promotion_failure_alot_gc_number;)
    57   NOT_PRODUCT(volatile size_t _promotion_failure_alot_gc_number;)
    59 
    58 
    60   // Reason for current garbage collection.  Should be set to
    59   // Reason for current garbage collection.  Should be set to
    61   // a value reflecting no collection between collections.
    60   // a value reflecting no collection between collections.
   147   // after the Universe is fully formed, but before general heap allocation is allowed.
   146   // after the Universe is fully formed, but before general heap allocation is allowed.
   148   // This is the correct place to place such initialization methods.
   147   // This is the correct place to place such initialization methods.
   149   virtual void post_initialize() = 0;
   148   virtual void post_initialize() = 0;
   150 
   149 
   151   MemRegion reserved_region() const { return _reserved; }
   150   MemRegion reserved_region() const { return _reserved; }
   152 
   151   address base() const { return (address)reserved_region().start(); }
   153   // Return the number of bytes currently reserved, committed, and used,
       
   154   // respectively, for holding objects.
       
   155   size_t reserved_obj_bytes() const { return _reserved.byte_size(); }
       
   156 
   152 
   157   // Future cleanup here. The following functions should specify bytes or
   153   // Future cleanup here. The following functions should specify bytes or
   158   // heapwords as part of their signature.
   154   // heapwords as part of their signature.
   159   virtual size_t capacity() const = 0;
   155   virtual size_t capacity() const = 0;
   160   virtual size_t used() const = 0;
   156   virtual size_t used() const = 0;