Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix memory requirement calculation

detb6f50851facc
diff --git a/source/de/anomic/ymage/ymageMatrix.java b/source/de/anomic/ymage/ymageMatrix.java
index c4ac70d18..552395c1c 100644
--- a/source/de/anomic/ymage/ymageMatrix.java
+++ b/source/de/anomic/ymage/ymageMatrix.java
@@ -75,7 +75,7 @@ public class ymageMatrix {
}
public ymageMatrix(int width, int height, byte drawMode, long backgroundColor) {
- if (!(serverMemory.request(1024 * 1024 + 3 * width * height, false))) throw new RuntimeException("ymage: not enough memory (" + serverMemory.available() + ") available");
+ if (!(serverMemory.request(1024L * 1024L + 3 * width * height, false))) throw new RuntimeException("ymage: not enough memory (" + serverMemory.available() + ") available");
this.width = width;
this.height = height;
this.backgroundCol = backgroundColor;