|
[Sponsors] |
Garbage collector and memory used in the system |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 27, 2009, 09:17 |
Garbage collector and memory used in the system
|
#1 |
Member
Virginie Ehrlacher
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
Hello Foamers,
I am sorry to ask such a stupid question but I did not find any thread on the subject. How can we call the garbage collector of C++ in OpenFOAM syntax and how can we see the size of the memory allocated during the simulation? I tried the following command lines: System.GC.Collect(); and Console::WriteLine("memory allocated", Environment::WorkingSet); but I got some error messages such as Console, Environment and System have not been declared. This may be just a question of C++ and of package to load. I beg your pardon for polluting the forum if it is the case but some help would be very much appreciated. Thank you in advance Virginie |
|
May 28, 2009, 11:19 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
May 28, 2009, 21:57 |
|
#3 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
Dear Vergine,
yes, no garbage collecion in C++. If "top" is good enough, you can profile the memory comsumption using getrusage. Consult the man page for details. Henrik |
|
May 29, 2009, 08:00 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
|
|