juananneother
juananneother

Reputation: 155

Will Java memory leak always show up in old gen consumption?

I've been debugging what I was told was a "memory leak" but comparing the old gen graphs of the bad build and the good build, they look almost identical. Is it safe to call this as not a memory leak or is there something else I could be missing?

Upvotes: 1

Views: 383

Answers (1)

Chris Cooper
Chris Cooper

Reputation: 5122

Yes, you would expect it to appear in the old generation, but I have seen cases where poorly written code is constantly destroying unused objects but then recreating them from unpurged data elsewhere.

The net result was a lot of stuff in Eden, and very little ever getting beyond tenured memory or more static parts of the memory model. This resulted in a lot of full GCs, but nothing obviously affecting the tenured memory.

Upvotes: 1

Related Questions