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 13, 2024
1 parent 9056b3b commit c6128ea
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 @@ -103,6 +103,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 @@ -85,6 +85,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 c6128ea

Please sign in to comment.