MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / outOfMemory

Method outOfMemory

ij/src/main/java/ij/IJ.java:824–840  ·  view source on GitHub ↗

Displays an "out of memory" message to the "Log" window.

(String name)

Source from the content-addressed store, hash-verified

822
823 /** Displays an "out of memory" message to the "Log" window. */
824 public static void outOfMemory(String name) {
825 Undo.reset();
826 System.gc();
827 lastErrorMessage = "out of memory";
828 String tot = Runtime.getRuntime().maxMemory()/1048576L+"MB";
829 if (!memMessageDisplayed)
830 log(">>>>>>>>>>>>>>>>>>>>>>>>>>>");
831 log("<Out of memory>");
832 if (!memMessageDisplayed) {
833 log("<All available memory ("+tot+") has been>");
834 log("<used. To make more available, use the>");
835 log("<Edit>Options>Memory & Threads command.>");
836 log(">>>>>>>>>>>>>>>>>>>>>>>>>>>");
837 memMessageDisplayed = true;
838 }
839 Macro.abort();
840 }
841
842 /** Updates the progress bar, where 0<=progress<=1.0. The progress bar is
843 not shown in BatchMode and erased if progress>=1.0. The progress bar is

Callers 15

runMethod · 0.95
mergeStacksMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
openStackMethod · 0.95
openTiffStackMethod · 0.95
openAllMethod · 0.95
createStackMethod · 0.95
openImageMethod · 0.95
paintMethod · 0.95
paintDoubleBufferedMethod · 0.95

Calls 5

resetMethod · 0.95
logMethod · 0.95
abortMethod · 0.95
maxMemoryMethod · 0.45
getRuntimeMethod · 0.45

Tested by

no test coverage detected