Skip to content

Commit

Permalink
8301187: Memory leaks in OopMapCache
Browse files Browse the repository at this point in the history
Reviewed-by: fparain, coleenp
  • Loading branch information
jcking authored and coleenp committed Jan 27, 2023
1 parent fccf818 commit e2a3b20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hotspot/share/interpreter/oopMapCache.cpp
Expand Up @@ -540,6 +540,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 @@ -610,5 +611,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 e2a3b20

@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.