I disabled "Show Suggestions Bar after last output" in the preferences. I begin my code with $HistoryLength = 0
. After running my code, I run the following.
ClearSystemCache[];
Share[];
Remove["Global`*"];
However, MemoryInUse[]
reveals that the kernal still takes up a few gigabytes of memory. What is stored in the kernel? Other than Quit[]
, what commands can free up most of the memory?
41254400
bytes, or 39.3 MB. How much data have you generated in expressions between your two code blocks? $\endgroup$70577952
bytes, and end with5100297040
bytes. I do not expect so much memory to be used. Even if there is any memory leak in my code, I have expected the commands in the OP to free up most of the memory. $\endgroup$