Skip to content
Permalink
Browse files
8277899: Parallel: Simplify PSVirtualSpace::initialize logic
Reviewed-by: tschatzl, sjohanss
  • Loading branch information
albertnetymk committed Nov 30, 2021
1 parent 01cefc9 commit 915084041f32bf6ffe4d12c031ac5e69adcc07f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
@@ -65,9 +65,7 @@ void ObjectStartArray::initialize(MemRegion reserved_region) {
MemTracker::record_virtual_memory_type((address)backing_store.base(), mtGC);

// We do not commit any memory initially
if (!_virtual_space.initialize(backing_store, 0)) {
vm_exit_during_initialization("Could not commit space for ObjectStartArray");
}
_virtual_space.initialize(backing_store);

_raw_base = (jbyte*)_virtual_space.low_boundary();

@@ -56,16 +56,10 @@ PSVirtualSpace::PSVirtualSpace():
}

// Deprecated.
bool PSVirtualSpace::initialize(ReservedSpace rs,
size_t commit_size) {
void PSVirtualSpace::initialize(ReservedSpace rs) {
set_reserved(rs);
set_committed(reserved_low_addr(), reserved_low_addr());

// Commit to initial size.
assert(commit_size <= rs.size(), "commit_size too big");
bool result = commit_size > 0 ? expand_by(commit_size) : true;
DEBUG_ONLY(verify());
return result;
}

PSVirtualSpace::~PSVirtualSpace() {
@@ -73,7 +73,7 @@ class PSVirtualSpace : public CHeapObj<mtGC> {
_special(false) {
}
PSVirtualSpace();
bool initialize(ReservedSpace rs, size_t commit_size);
void initialize(ReservedSpace rs);

bool contains(void* p) const;

1 comment on commit 9150840

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 9150840 Nov 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.