/** Returns the maximum amount of memory available to ImageJ or zero if ImageJ is unable to determine this limit. */ public static long maxMemory() { if (maxMemory==0L) { Memory mem = new Memory(); maxMemory = mem.getMemorySetting(); if (maxMemory==0L) maxMemory = mem.maxMemory(); } return maxMemory; }
/** Returns the maximum amount of memory available to ImageJ or zero if ImageJ is unable to determine this limit. */ public static long maxMemory() { if (maxMemory==0L) { Memory mem = new Memory(); maxMemory = mem.getMemorySetting(); if (maxMemory==0L) maxMemory = mem.maxMemory(); } return maxMemory; }
void showError() { int max = (int)(maxMemory()/1048576L); String msg = "ImageJ is unable to change the memory limit. For \n" + "more information, refer to the installation notes at\n \n" + " "+IJ.URL+"/docs/install/\n" + " \n"; if (fileMissing) { if (IJ.isMacOSX()) msg += "The ImageJ application (ImageJ.app) was not found.\n \n"; else if (IJ.isWindows()) msg += "ImageJ.cfg not found.\n \n"; fileMissing = false; } if (max>0) msg += "Current limit: " + max + "MB"; IJ.showMessage("Memory", msg); }
void showError() { int max = (int)(maxMemory()/1048576L); String msg = "ImageJ is unable to change the memory limit. For \n" + "more information, refer to the installation notes at\n \n" + " "+IJ.URL+"/docs/install/\n" + " \n"; if (fileMissing) { if (IJ.isMacOSX()) msg += "The ImageJ application (ImageJ.app) was not found.\n \n"; else if (IJ.isWindows()) msg += "ImageJ.cfg not found.\n \n"; fileMissing = false; } if (max>0) msg += "Current limit: " + max + "MB"; IJ.showMessage("Memory", msg); }
if (max==0) max = (int)(maxMemory()/1048576L); String title = "Memory "+(IJ.is64Bit()?"(64-bit)":"(32-bit)"); GenericDialog gd = new GenericDialog(title);
if (max==0) max = (int)(maxMemory()/1048576L); String title = "Memory "+(IJ.is64Bit()?"(64-bit)":"(32-bit)"); GenericDialog gd = new GenericDialog(title);