Java fixed memory map

Posted by juber on Stack Overflow See other posts from Stack Overflow or by juber
Published on 2010-05-31T03:50:58Z Indexed on 2010/05/31 3:52 UTC
Read the original article Hit count: 300

Filed under:
|
|
|
|

Hi,

Is there a simple, efficient Map implementation that allows a limit on the memory to be used by the map.

My use case is that I want to allocate dynamically most of the memory available at the time of its creation but I don't want OutOFMemoryError at any time in future. Basically, I want to use this map as a cache, but but I wanna avoid heavy cache implementations like EHCache. My need is simple (at most an LRU algorithm)

© Stack Overflow or respective owner

Related posts about java

Related posts about cache