File tree 2 files changed +6
-0
lines changed
src/hotspot/share/jfr/recorder
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ bool JfrCheckpointManager::initialize() {
109
109
// preallocate buffer count to each of the epoch live lists
110
110
for (size_t i = 0 ; i < global_buffer_prealloc_count * 2 ; ++i) {
111
111
Buffer* const buffer = mspace_allocate (global_buffer_size, _global_mspace);
112
+ if (buffer == nullptr ) {
113
+ return false ;
114
+ }
112
115
_global_mspace->add_to_live_list (buffer, i % 2 == 0 );
113
116
}
114
117
assert (_global_mspace->free_list_is_empty (), " invariant" );
Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ bool JfrStringPool::initialize() {
131
131
// preallocate buffer count to each of the epoch live lists
132
132
for (size_t i = 0 ; i < string_pool_cache_count * 2 ; ++i) {
133
133
Buffer* const buffer = mspace_allocate (string_pool_buffer_size, _mspace);
134
+ if (buffer == nullptr ) {
135
+ return false ;
136
+ }
134
137
_mspace->add_to_live_list (buffer, i % 2 == 0 );
135
138
}
136
139
assert (_mspace->free_list_is_empty (), " invariant" );
You can’t perform that action at this time.
0 commit comments