How many entries theoretically can ChronicleMap contain at maximum? What is the number of maximum entries one can put to ChronicleMap?
Asked
Active
Viewed 242 times
1 Answers
4
The theoretical maximum is limited by the virtual memory you can have. This can be as low as 128 TB depending on your OS. By comparison Chronicle Queue doesn't have this limit, as it swaps in memory mappings, but would be much slower for random access as a result.
In practice, limiting the size of your map to 2x - 40x main memory size seems to be a realistic upper bound.
In short, the smaller the entries, the more you can have.

Peter Lawrey
- 525,659
- 79
- 751
- 1,130
-
what map.size will return if the numbers of entries is higher than Integer.MAX_VALUE? – kem Jun 25 '18 at 08:34
-
It returns `Integer.MAX_VALUE` There is also a `longSize()` method. – Peter Lawrey Jun 25 '18 at 09:20