Displays an "out of memory" message to the "Log" window.
(String name)
| 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 |
no test coverage detected