Salome HOME
PR: debug gui display
[modules/smesh.git] / src / SMESH / memoire.h
1
2 #ifndef _MEMOIRE_H_
3 #define _MEMOIRE_H_
4
5 #include <malloc.h>
6 #include <iostream>
7
8 void memostat( const char* f, int l);
9
10 void memostat( const char* f, int l)
11 {
12 /*  struct mallinfo mem = mallinfo(); */
13 /*  std::cerr << f << ":"<< l << " " << mem.arena << " " << mem.ordblks << " " << mem.hblks << " " << mem.hblkhd << " "  << mem.uordblks << " "  << mem.fordblks << " " << mem.keepcost << std::endl; */
14 std::cerr << f << ":"<< l << " --------------------------"<< std::endl;
15  malloc_stats();
16 std::cerr << f << ":"<< l << " --------------------------"<< std::endl;
17 }
18
19 #define MEMOSTAT memostat( __FILE__, __LINE__ )
20
21 #endif