Restart Kernel - Maple Help

restart

clear internal memory

 Calling Sequence restart

Description

 • 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.

 Reset Unaffected variables character and paragraph settings and styles procedures page numbering shared libraries numeric formatting imported files and data output from Maple commands and context menus files of Maple code read context menus on most output Maplet definitions drawing palette on most output loaded packages equation labels Typesetting rules embedded components* (see note above) plot output and display options print settings commands in spreadsheets spreadsheet cell assignments help searches currentdir kernelopts(ASSERT) kernelopts(display_zero_complex_part) kernelopts(assertlevel) kernelopts(max_record_depth) kernelopts(cacheclearlimit) kernelopts(numcpus) kernelopts(cpulimit) interface(elision ...) kernelopts(datalimit) interface(historyfile) kernelopts(filelimit) interface(historysize) kernelopts(inline) interface(labelwidth) kernelopts(jvmheaplimit) interface(typesetting) kernelopts(limitjvmheap) options from the Options menu (Standard interface) kernelopts(opaquemodules) kernelopts(printbytes) kernelopts('printlevel') kernelopts(processlimit) kernelopts(profile) kernelopts(sparse_sort_cutoff) kernelopts(stacklimit) interface(ansi) interface(autoassign) interface(displayprecision) interface(echo) interface(errorbreak) interface(errorcursor) interface(imaginaryunit) interface(indentamount) interface(labeling) interface(latexwidth) interface(longdelim) interface(plotdevice) interface(plotoptions) interface(plotoutput) interface(postplot) interface(preplot) interface(prettyprint) interface(prompt) interface(quiet) interface(rtablesize) interface(screenheight) interface(screenwidth) interface(showassumed) interface(verboseproc) interface(warnlevel) interface(worksheetdir)

Examples

 > $a≔2$
 ${a}{≔}{2}$ (1)
 > $\mathrm{with}\left(\mathrm{inttrans}\right):$
 > $\mathrm{fourier}\left(x,x,t\right)$
 ${2}{}{I}{}{\mathrm{\pi }}{}{\mathrm{Dirac}}{}\left({1}{,}{t}\right)$ (2)
 > $\mathrm{interface}\left(\mathrm{verboseproc}=0\right)$
 ${1}$ (3)

Note that the output of an interface variable assignment is the old value, not the new one.

 > proc(x)    trunc(x): end proc;
 ${\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (4)
 > ${52}^{104}$
 ${29130486520243894529623053895593834890786414833841548364617732063716754081481379078028552440792926355704746836652054508584597185528433952366101529418011123632967861702261909487616}$ (5)
 > $\mathrm{interface}\left(\mathrm{elisionthreshold}=100\right):$
 > $\mathrm{interface}\left(\mathrm{elisiondigitsbefore}=10\right):$
 > $\mathrm{interface}\left(\mathrm{elisiondigitsafter}=15\right):$
 > ${52}^{104}$
 ${2913048652\left[...154 ⅆigits...\right]702261909487616}$ (6)
 > $\mathrm{interface}\left(\mathrm{typesetting}=\mathrm{extended}\right)$
 ${\mathrm{extended}}$ (7)
 > $\mathrm{Typesetting}\left[\mathrm{Settings}\right]\left(\mathrm{useprime}=\mathrm{false}\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{diff}\left(f\left(x\right),x\right)$
 $\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}\right)$ (9)

After restart, the variable assignment, loaded package, interface verboseproc variable, and typesetting rules are reset.  The interface elision and typesetting variables remain.

 > $\mathrm{restart}$
 > $a$
 ${a}$ (10)
 > $\mathrm{fourier}\left(x,x,t\right)$
 ${\mathrm{fourier}}{}\left({x}{,}{x}{,}{t}\right)$ (11)
 > proc(x)    trunc(x): end proc;
 ${\mathbf{proc}}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{trunc}}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (12)
 > ${52}^{104}$
 ${2913048652\left[...154 ⅆigits...\right]702261909487616}$ (13)
 > $\mathrm{diff}\left(f\left(x\right),x\right)$
 $\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}\right)$ (14)
 > $\mathrm{interface}\left(\mathrm{typesetting}\right)$
 ${\mathrm{extended}}$ (15)
 >