You are right.  Thanks!

Basically, I don't see why it uses the number of allocations occurred during last 10 seconds to determine the number of memory regions to release.  Could you elaborate why this works?  Here are some other counterexamples:

* It still doesn't prevent itself from releasing the entry when you did only a single allocation.
* Sometimes it does not return unused memory regions:
  1. allocate many buffers from thread-local cache but do not free them yet
  1. after 10 secs, freeUpIfNecessary() frees some memory regions
  1. The buffers allocated at (1) are released.  thread-local cache now has as many memory regions as the number of the released buffers, but `allocations` is 0.
  1. freeUpIfNecessary() might not free the memory regions added in (3) if the user decides not to allocate the buffers of the same size class anymore.