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:
Mark Olesen
2023-12-15 14:05:32 +01:00
parent 2045de8345
commit 7e0acfa4ed
30 changed files with 391 additions and 354 deletions

View File

@ -1,3 +1,3 @@
Test-memInfo.C
Test-memInfo.cxx
EXE = $(FOAM_USER_APPBIN)/Test-memInfo

View File

@ -47,14 +47,18 @@ int main(int argc, char *argv[])
memInfo mem;
Info<< memTags << mem << endl;
List<vector> lst(n, vector::one);
Info<< "allocate " << n << " vectors" << nl
<< memTags << mem.update() << endl;
List<vector> list(n, vector::one);
lst.clear();
Info<< "clear" << nl
<< memTags << mem.update() << endl;
Info<< "allocate " << n << " vectors" << nl;
Info<< memTags << mem.update() << endl;
list.clear();
Info<< "clear" << nl;
Info<< memTags << mem.update() << endl;
mem.writeEntry("memory", Info);
Info<< endl;
return 0;
}