Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about RAM usage, including optimizing memory use, avoiding and fixing leaks and releasing unused memory.
4
votes
Accepted
How to release the space took up by specify variable
Using $HistoryLength = 0 and Clear[a] works for me:
$HistoryLength = 0;
memory:=Row[{"Memory Used:",MemoryInUse[]/1024^2.," MB"}]
memory
a=RandomInteger[1,{10^8}];
memory
b=RandomInteger[1,{10^8}]; … memory
Clear[a];
memory
Memory Used:227.932 MB
Memory Used:990.87 MB
Memory Used:1753.81 MB
Memory Used:990.868 MB …
13
votes
Memory leak in the system function: how to free memory without restarting the kernel?
You can get rid of some of the memory leak by executing the following:
cleanupTextSentences[] := Remove[
"NaturalLanguageProcessing`TextCases`PackagePrivate`interpretations$@",
"NaturalLanguageProcessing …
2
votes
Accepted
Set of order preserving functions
If I understand your problem correctly, you can use Reduce. First convert the poset relations into a set of inequalities:
ineq = Less @@@ L;
Next, extract the points of the poset:
v = Union @ Flat …
5
votes
Accepted
Code in separate cells causes a kernel crash
Apparently the storage of data causes Mathematica to exceed your available memory. The workaround is simple. Either use $HistoryLength=0, or terminate your cells with something like ; ; or ; 1;. …
11
votes
Accepted
Memory leak with FindMaximum/Minimum inside of Module
Please report this as a bug. A minimal example:
Quiet @ Remove["System`Dump`rep$*"];
Quiet @ Remove["System`Dump`rules$*"];
Quiet @ Remove["IPOPTLink`Private`monitor$*"];
if=NDSolveValue[{f'[x]==-2 …
3
votes
Reading a file as a ByteArray?
You can use the new in M11.3 function ReadByteArray:
path = ExampleData[{"TestImage", "Mandrill"}, "FilePath"];
MaxMemoryUsed[ba = ReadByteArray[path]] //AbsoluteTiming
Head[ba]
{0.000439, 72376 …