mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add support for copy to/from native memory for interop with java-lang.
This commit is contained in:
+2
@@ -31,6 +31,8 @@ public abstract class CopyingMetaBytesInterop<E, W> extends BasicCopyingMetaByte
|
||||
private static final long MAX_REASONABLE_SERIALIZED_SIZE = MemoryUnit.MEGABYTES.toBytes(16L);
|
||||
|
||||
public static void checkMaxSizeStillReasonable(long maxSize, Exception ex) {
|
||||
if (ex != null)
|
||||
throw new IllegalStateException("Unable to serialize the object " + ex, ex);
|
||||
if (maxSize > MAX_REASONABLE_SERIALIZED_SIZE) {
|
||||
throw new IllegalStateException("We try to figure out size of objects " +
|
||||
"in serialized form, but it exceeds " +
|
||||
|
||||
Reference in New Issue
Block a user