cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <>
Subject [c2] MRUMemoryStore: can this really work?
Date Fri, 24 Aug 2001 22:29:08 GMT
Because of Vadims entitled objections I just overlooked the cleanupthread
in the MRUMemoryStore.
When I developed this store I overtaken this thread from the MemoryStore
of cocoon1 with the believe that it works.

But thinking a little bit about it, I have my doubts that the while
loop below works.
The free() method removes the last element of the cache. But it's
guaranteed that memory is immediately deallocated? The gc()is thread
with minor priority and I have the apprehension that due this case
this algorithm doesn't work right.

What do you think out there?
if (this.jvm.totalMemory() - this.jvm.freeMemory() > this.heapsize) {
  synchronized (this) {
    while ((this.cache.size() > 0) && (this.jvm.freeMemory() <
this.freememory)) {;


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

View raw message