Skip to content
Permalink
Browse files

8238356: CodeHeap::blob_count() overestimates the number of blobs

Decremented _blob_count on addition to the free list

Reviewed-by: lucy, shade, thartmann
  • Loading branch information
Rahul Raghavan
Rahul Raghavan committed Feb 19, 2020
1 parent 16c75e6 commit 7b24bd68c282c8b1064b2fa6b650a2dac103abd2
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/hotspot/share/memory/heap.cpp
@@ -612,6 +612,9 @@ void CodeHeap::add_to_freelist(HeapBlock* a) {
size_t bseg = segment_for(b);
_freelist_length++;

_blob_count--;
assert(_blob_count >= 0, "sanity");

assert(b != _freelist, "cannot be removed twice");

// Mark as free and update free space count

0 comments on commit 7b24bd6

Please sign in to comment.