source: XIOS3/trunk/src/interface/c/icmem_checker.cpp @ 2418

Last change on this file since 2418 was 2418, checked in by jderouillat, 18 months ago

Integrates a system to log the memory consumption from XIOS init to XIOS finalize, and a HTML webpage to visualize it. The API to use it from models is available too.

File size: 365 bytes
Line 
1
2#include "mem_checker.hpp"
3#include <string>
4#include <iostream>
5
6
7using namespace xios;
8
9extern "C"
10{
11  void cxios_mem_checker_get(double* mem)
12  {
13    *mem=CMemChecker::getMemRSS();
14  }
15
16  void cxios_mem_checker_log(const char* mem_id, int len_mem_id, bool* finalize)
17  {
18    std::string str(mem_id,len_mem_id);
19    CMemChecker::logMem(str, *finalize);
20  }
21
22}
23
24
Note: See TracBrowser for help on using the repository browser.