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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options answers only user 280

Questions about RAM usage, including optimizing memory use, avoiding and fixing leaks and releasing unused memory.

6
votes
function getFreePhysMemNet[] returns the amount of free physical memory in Kb. This method is 30 times slower than direct calling of the GlobalMemoryStatusEx function of kernel32.dll which is availiable … ]], memorystatusex@ullAvailPhys, Message[getFreePhysMem::internalError]; Abort[]; $Failed]]; The function getFreePhysMem[] returns the amount of free physical memory in bytes. Timings: In[10]:= Do …
answered Mar 16 '12 by Alexey Popkov
15
votes
In addition to Mr.Wizard's answer. In many cases it is very practical to stop the evaluation when the actual amount of free physical memory in your system becomes less than specified threshold. You … can get the amount of free physical memory very efficiently via NETLink call to GlobalMemoryStatusEx function of kernel32.dll (which is available both under 32 bit and 64 bit Windows systems). Here I …
answered Mar 15 '12 by Alexey Popkov
6
votes
] multiple times: Table[a[1], {1000}]; Length@Names[$Context <> "*"] 1007 We get 1000 new Temporary variables each having its own OwnValue! What is the memory leak! One workaround I see is …
answered Nov 15 '13 by Alexey Popkov
4
votes
Update 3 As ilian correctly states in the comments, without NIntegrate we get the same picture as shown in the "Update 2" section. It proves that memory grow reflects temporary memory allocation by … Table, and ClearSystemCache[] does completely eliminate the memory leak. We can also switch off the caching completely: SetSystemOptions[ "CacheOptions" -> {"Numeric" -> {"Cache" -> False …
answered Aug 18 '15 by Alexey Popkov
2
votes
It seems that using new in version 11.2 StringToByteArray you can reduce the memory requirements: file = ExampleData[{"TestImage", "Mandrill"}, "FilePath"]; byteList = BinaryReadList[path]; string … above, String requires 5 times lesser memory than packed array of integers returned by BinaryReadList while StringToByteArray (without second argument) takes only a tiny amount of additional memory. A …
answered Sep 18 '17 by Alexey Popkov
0
votes
., 6.44, 2., 342.3, 3.}, {-1.314, 0., 4.32, 1., 6.44, 2., 342.3, 3.}} If you run into memory constraints with this solution, you can process the file line-by-line: file = "(-1.314,0) (4.32,1) (6.44,2 …
answered Dec 23 '17 by Alexey Popkov
2
votes
(Incomplete answer containing only references.) Is there a way to get Mathematica to export chunks at a time and stitch them together afterward, so as not to hit a memory limit? Yes, I already …
answered Feb 14 '17 by Alexey Popkov