Hi,
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?
<snip>
if (this.jvm.totalMemory() - this.jvm.freeMemory() > this.heapsize) {
  this.jvm.runFinalization();
  this.jvm.gc();
  synchronized (this) {
    while ((this.cache.size() > 0) && (this.jvm.freeMemory() <
this.freememory)) {
      this.free();
     }
  }
}
</snip>

Greets
Gerhard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to