clear internal memory
The restart command causes the Maple kernel to clear its internal memory so that Maple acts (almost) as if just started.
A warning message will appear when restart is called by the restart button in the toolbar (
) in the Standard interface, but not when the restart command is entered and executed.
On restart, the Maple kernel returns most of the memory it has allocated to the operating system. This includes, but is not limited to, garbage collection. After a restart, the amount of memory the Maple kernel has allocated should be similar to the amount of memory allocated when a Maple kernel first starts.
The settings of all identifiers (variables and procedures) are reset, libname is reset to its initial state, names read from any repositories are marked as unread, and then the Maple initialization files are reread.
Shared libraries loaded for external_calling are unloaded on restart. The Java Virtual Machine that is started for Java external calling is terminated on restart.
The output of Maple commands remains, but the memory of their execution is erased. So although the ditto operators will not work, the context menus are still available on (almost) all output, and equation labels may be referenced. The numbering of equation labels continues, as they refer only to the output.
The only type of displayed output that can no longer be manipulated is data in rtables. In general, Arrays, Matrices, and Vectors no longer have working context menus after restart, including imported data, which is displayed in an rtable.
The restart command only works at the top level. It cannot be executed within a procedure, or from a file being read by the read statement; this would cause Maple to be in an inconsistent state. It must be executed in a separate prompt (or line) from all other commands, since all commands in a prompt are passed to the kernel at once; entering other commands in the prompt could cause unexpected results.
Note that most Maple packages can be unloaded using the unwith command. However, there are some older packages with a table-based implementation, rather than the newer module-based implementation, which can only be unloaded using the restart command. A list of these packages is found on the unwith help page.
When Command-line Maple is started with the -c option, the specified commands are re-executed after a restart. For information on the -c option, see maple.
In the Standard interface, the autoexecute feature may be set on individual commands before restart is executed, and repeating autoexecution after restart will re-execute only those commands.
Note that any existing start up code will also be re-executed.
Any help searches that have been performed are cleared on restart, but the help history is not affected, and the current help pages remain open.
Note: Using restart in a document that contains embedded components is not advised, since any expressions that have been executed outside the component, then used inside, are reset, even though the contents of components are not affected.
If multiple Maple documents are open, either in separate tabs or in separate windows, restart will only apply to the document(s) associated with the Maple kernel in which the restart command is executed. By default, this is only the current document. This setting is controlled by the options for the Mathematical Engine in the Options dialog.
Below is a table of properties affected and not affected by a restart, including a list of kernelopts and interface settings and how they are affected.
character and paragraph settings and styles
imported files and data
output from Maple commands and context menus
files of Maple code read
context menus on most output
drawing palette on most output
embedded components* (see note above)
plot output and display options
commands in spreadsheets
spreadsheet cell assignments
options from the Options menu (Standard interface)
a ≔ 2
Note that the output of an interface variable assignment is the old value, not the new one.
After restart, the variable assignment, loaded package, interface verboseproc variable, and typesetting rules are reset. The interface elision and typesetting variables remain.
Download Help Document
What kind of issue would you like to report? (Optional)