Skip to content

Commit

Permalink
Backport cf4ede0e544fbd758cc9e93c695fb19fb7da0f9a
Browse files Browse the repository at this point in the history
  • Loading branch information
neethu-prasad committed Jun 17, 2024
1 parent fcd7fb7 commit dd179d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ bool JfrCheckpointManager::initialize() {
// preallocate buffer count to each of the epoch live lists
for (size_t i = 0; i < global_buffer_prealloc_count * 2; ++i) {
Buffer* const buffer = mspace_allocate(global_buffer_size, _global_mspace);
if (buffer == nullptr) {
return false;
}
_global_mspace->add_to_live_list(buffer, i % 2 == 0);
}
assert(_global_mspace->free_list_is_empty(), "invariant");
Expand Down
3 changes: 3 additions & 0 deletions src/hotspot/share/jfr/recorder/stringpool/jfrStringPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ bool JfrStringPool::initialize() {
// preallocate buffer count to each of the epoch live lists
for (size_t i = 0; i < string_pool_cache_count * 2; ++i) {
Buffer* const buffer = mspace_allocate(string_pool_buffer_size, _mspace);
if (buffer == nullptr) {
return false;
}
_mspace->add_to_live_list(buffer, i % 2 == 0);
}
assert(_mspace->free_list_is_empty(), "invariant");
Expand Down

0 comments on commit dd179d9

Please sign in to comment.