This question comes from the recent question \"Correct way to cap Mathematica memory use?\"
I wonder, is it possible to programmatically restart MathKernel keeping the c
Sounds like a job for CleanSlate.
<< Utilities`CleanSlate`; CleanSlate[]
From: http://library.wolfram.com/infocenter/TechNotes/4718/
"CleanSlate, tries to do everything possible to return the kernel to the state it was in when the CleanSlate.m package was initially loaded."