|
[Sponsors] | |||||
Garbage collector and memory used in the system |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Virginie Ehrlacher
Join Date: Mar 2009
Posts: 52
Rep Power: 18 ![]() |
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 |
|
|
|
|
|
|
|
|
#2 | |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 52 ![]() ![]() |
Quote:
Bernhard |
||
|
|
|
||
|
|
|
#3 |
|
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 285
Rep Power: 19 ![]() |
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 |
|
|
|
|
|
|
|
|
#4 | |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 52 ![]() ![]() |
Quote:
Bernhard |
||
|
|
|
||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|