8055091: CollectedHeap::_reserved usage should be cleaned up

Added an initialization function for _reserved.

Reviewed-by: mgerdin, jwilhelm
This commit is contained in:
Marcus Larsson 2014-09-18 12:45:45 +02:00
parent bc07a22d12
commit f6ab247c45
6 changed files with 21 additions and 24 deletions

View file

@ -582,6 +582,14 @@ void CollectedHeap::post_full_gc_dump(GCTimer* timer) {
}
}
void CollectedHeap::initialize_reserved_region(HeapWord *start, HeapWord *end) {
// It is important to do this in a way such that concurrent readers can't
// temporarily think something is in the heap. (Seen this happen in asserts.)
_reserved.set_word_size(0);
_reserved.set_start(start);
_reserved.set_end(end);
}
/////////////// Unit tests ///////////////
#ifndef PRODUCT