Skip to content

Commit

Permalink
8238356: CodeHeap::blob_count() overestimates the number of blobs
Browse files Browse the repository at this point in the history
Decremented _blob_count on addition to the free list

Reviewed-by: lucy, shade, thartmann
  • Loading branch information
Rahul Raghavan committed Feb 19, 2020
1 parent 16c75e6 commit 7b24bd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hotspot/share/memory/heap.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 7b24bd6

Please sign in to comment.