struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <>
Subject [OT] A question on garbage collecting
Date Tue, 01 Aug 2006 20:45:36 GMT

I have a question regarding a weird behaviour of the garbage
collector, maybe someone here, has more experience with it, and can
answer the question. Otherwise sorry for the OT.

We have a cache for caching 1000.000 user objects along with many
(some hundred thousand) not existing objects (negative cachingto
prevent db requests). The cache is an array of softreferences to the
objects. We used softreferences to prevent oome in case we don'T have
enough ram. However now we do have enough ram - 6 Gb assigned to the
java process, and System.freeMemory is always above 1 gig.

However, I see that through the cache isn't full yet, and there is
plenty of free memory, 500.000 objects have been garbage collected.

Could it be that softreference are collected independent of available
memory? If true, isn't it weird? ;-(


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message