I experienced an OOME with my app so I opened up the heap dump in MAT. Amongst other things I noticed the SoftCache running at much higher memory consumption than expected, with thousands of SoftCache$Entry instances. I would expect all soft references that pass the normal heuristics (no strong references to the referent) to be GC'd so I was surprised to see these still there.
Looking inside the SoftCache$Entrys I noticed that the referent, a BPage, is also the _ser attribute. This must stop the referent being garbage collected. Is this expected behaviour? If so, how does the SoftCache ever have its entries GC'd?
It's all the more confusing because when I look at the code I can only see one path to create an Entry, and that sets the _ser as null! That is, via SoftCache.get:250 -> SoftCache.put(key, value, false, null).
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jdbm/discussion/12570/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/