mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: handle 64-bit memory information (#3060)
- on large memory systems (eg, 6TB) the process information exceeds an 'int' range, so adjust parsing of the /proc/.. to use int64 ENH: update/modernize OSspecific system information ENH: minor update of profiling code - std::string, noexcept, lazier evaluations STYLE: use direct call of memInfo
This commit is contained in:
@ -463,8 +463,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
cpuTime timer;
|
||||
memInfo mem;
|
||||
Info<< "Initial memory " << mem.update().size() << " kB" << endl;
|
||||
Info<< "Initial memory " << Foam::memInfo{}.size() << " kB" << endl;
|
||||
|
||||
#include "createNamedMeshes.H"
|
||||
#include "createMeshAccounting.H"
|
||||
@ -496,7 +495,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Startup in "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << nl << endl;
|
||||
<< Foam::memInfo{}.size() << " kB" << nl << endl;
|
||||
|
||||
|
||||
forAll(timeDirs, timei)
|
||||
@ -587,7 +586,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Wrote in "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << nl << nl;
|
||||
<< Foam::memInfo{}.size() << " kB" << nl << nl;
|
||||
}
|
||||
|
||||
// Write cases
|
||||
@ -606,7 +605,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "\nEnd: "
|
||||
<< timer.elapsedCpuTime() << " s, "
|
||||
<< mem.update().peak() << " kB (peak)" << nl << endl;
|
||||
<< Foam::memInfo{}.peak() << " kB (peak)" << nl << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -712,15 +712,14 @@ int main(int argc, char *argv[])
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
cpuTime timer;
|
||||
memInfo mem;
|
||||
Info<< "Initial memory " << mem.update().size() << " kB" << endl;
|
||||
Info<< "Initial memory " << Foam::memInfo{}.size() << " kB" << endl;
|
||||
|
||||
#include "createNamedMeshes.H"
|
||||
#include "createMeshAccounting.H"
|
||||
|
||||
Info<< "VTK mesh topology: "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << endl;
|
||||
<< Foam::memInfo{}.size() << " kB" << endl;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -860,13 +859,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Wrote in "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << endl;
|
||||
<< Foam::memInfo{}.size() << " kB" << endl;
|
||||
}
|
||||
|
||||
|
||||
Info<< "\nEnd: "
|
||||
<< timer.elapsedCpuTime() << " s, "
|
||||
<< mem.update().peak() << " kB (peak)\n" << endl;
|
||||
<< Foam::memInfo{}.peak() << " kB (peak)\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user