We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfeb7d6 commit 62f39bdCopy full SHA for 62f39bd
src/hotspot/share/nmt/mallocSiteTable.cpp
@@ -179,7 +179,11 @@ MallocSite* MallocSiteTable::malloc_site(uint32_t marker) {
179
MallocSiteHashtableEntry* MallocSiteTable::new_entry(const NativeCallStack& key, MemTag mem_tag) {
180
void* p = AllocateHeap(sizeof(MallocSiteHashtableEntry), mtNMT,
181
*hash_entry_allocation_stack(), AllocFailStrategy::RETURN_NULL);
182
- return ::new (p) MallocSiteHashtableEntry(key, mem_tag);
+ if (p == nullptr) {
183
+ return nullptr;
184
+ } else {
185
+ return ::new (p) MallocSiteHashtableEntry(key, mem_tag);
186
+ }
187
}
188
189
bool MallocSiteTable::walk_malloc_site(MallocSiteWalker* walker) {
0 commit comments