mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Throw IllegalArgumentException with human-readable message in VanillaChronicleMap.Segment.alloc() method on attempt of allocation of more than 64 blocks
This commit is contained in:
@@ -897,6 +897,9 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
|
||||
}
|
||||
|
||||
int alloc(int blocks) {
|
||||
if (blocks > MAX_ENTRY_OVERSIZE_FACTOR)
|
||||
throw new IllegalArgumentException("Entry is too large: requires " + blocks +
|
||||
" entry size chucks, " + MAX_ENTRY_OVERSIZE_FACTOR + " is maximum.");
|
||||
int ret = (int) freeList.setNextNContinuousClearBits(nextPosToSearchFrom,
|
||||
blocks);
|
||||
if (ret == DirectBitSet.NOT_FOUND) {
|
||||
|
||||
Reference in New Issue
Block a user