Skip to content

Commit

Permalink
8301187: Memory leaks in OopMapCache
Browse files Browse the repository at this point in the history
Backport-of: e2a3b20ca80186a3d3d1a2a9029036b088b3fc9c
  • Loading branch information
shipilev committed Jun 2, 2023
1 parent c1e979f commit ac9c696
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hotspot/share/interpreter/oopMapCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ void OopMapCache::lookup(const methodHandle& method,
// at this time. We give the caller of lookup() a copy of the
// interesting info via parameter entry_for, but we don't add it to
// the cache. See the gory details in Method*.cpp.
tmp->flush();
FREE_C_HEAP_OBJ(tmp);
return;
}
Expand Down Expand Up @@ -606,5 +607,6 @@ void OopMapCache::compute_one_oop_map(const methodHandle& method, int bci, Inter
tmp->initialize();
tmp->fill(method, bci);
entry->resource_copy(tmp);
tmp->flush();
FREE_C_HEAP_OBJ(tmp);
}

1 comment on commit ac9c696

@openjdk-notifier
Copy link

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.