--- old/src/share/vm/gc_implementation/g1/heapRegion.hpp 2014-06-25 13:43:35.163498946 +0200 +++ new/src/share/vm/gc_implementation/g1/heapRegion.hpp 2014-06-25 13:43:35.055494542 +0200 @@ -127,8 +127,6 @@ friend class VMStructs; HeapWord* _top; protected: - inline HeapWord* cas_allocate_inner(size_t size); - inline HeapWord* allocate_inner(size_t size); G1BlockOffsetArrayContigSpace _offsets; Mutex _par_alloc_lock; volatile unsigned _gc_time_stamp; @@ -144,8 +142,16 @@ G1OffsetTableContigSpace(G1BlockOffsetSharedArray* sharedOffsetArray, MemRegion mr); - inline void set_top(HeapWord* value) { _top = value; } + void set_top(HeapWord* value) { _top = value; } HeapWord* top() const { return _top; } + + protected: + HeapWord** top_addr() { return &_top; } + // Allocation helpers (return NULL if full). + inline HeapWord* allocate_impl(size_t word_size, HeapWord* end_value); + inline HeapWord* par_allocate_impl(size_t word_size, HeapWord* end_value); + + public: void reset_after_compaction() { set_top(compaction_top()); } size_t used() const { return byte_size(bottom(), top()); } @@ -364,7 +370,11 @@ ParMarkRootClaimValue = 9 }; + // All allocated blocks are occupied by objects in a HeapRegion bool block_is_obj(const HeapWord* p) const; + + // Returns the object size for all valid block starts + // and the amount of unallocated words if called on top() size_t block_size(const HeapWord* p) const; inline HeapWord* par_allocate_no_bot_updates(size_t word_size);