I would try with trove collections, there is TIntObjectMap which can work for your intents.
More Related Contents:
- How can I create a memory leak in Java?
- In Java, what is the best way to determine the size of an object?
- Java using much more memory than heap size (or size correctly Docker memory limit)
- Get OS-level system information
- How to find a Java Memory Leak
- Java maximum memory on Windows XP
- How do I monitor the computer’s CPU, memory, and disk usage in Java?
- Calculate size of Object in Java [duplicate]
- How are integers internally represented at a bit level in Java?
- How to set the maximum memory usage for JVM?
- Java get available memory
- Growing resident memory usage (RSS) of Java Process
- boolean[] vs. BitSet: Which is more efficient?
- How to load a large xlsx file with Apache POI?
- General strategy to resolve Java memory leak?
- java.lang.OutOfMemoryError: PermGen space [closed]
- is memory leak? why java.lang.ref.Finalizer eat so much memory
- Difference between “on-heap” and “off-heap”
- Heap space out of memory
- Does variable = null set it for garbage collection
- What is the actual memory place for static variables?
- Why does the (Oracle) JVM have a fixed upper limit for memory usage (-Xmx)?
- Why does appending “” to a String save memory?
- Can the JVM max heap size be dynamic?
- How many string objects will be created in memory? [duplicate]
- How to determine the size of an object in Java
- Can’t get past 2542 Threads in Java on 4GB iMac OSX 10.6.3 Snow Leopard (32bit)
- Setting memory of Java programs that runs from Eclipse
- substring method in String class causes memory leak [duplicate]
- Java Memory explained (SUN JVM)