51#include <Teuchos_OpaqueWrapper.hpp>
75 pageSize = sysconf(_SC_PAGESIZE);
77#warning "Page size query is not possible. No per-process memory stats."
82 std::ostringstream fname;
83 fname <<
"/proc/" << pid <<
"/statm";
84 std::ifstream memFile;
87 memFile.open(fname.str().c_str());
95 while (memFile.good()){
96 memFile.getline(buf, 128);
102 std::istringstream sbuf(buf);
106 long pageKBytes = pageSize / 1024;
107 totalPages = atol(buf);
109 return totalPages * pageKBytes;
114#pragma message ("Zoltan2_Util.cpp: Page size query is not implemented on windows. No per-process memory stats.")
A gathering of useful namespace methods.
Created by mbenlioglu on Aug 31, 2020.
long getProcessKilobytes()