Commit ffc47e35 authored by BRAMAS Berenger's avatar BRAMAS Berenger

udpate memstat

parent 817763c3
......@@ -59,12 +59,20 @@ private:
#ifdef SCALFMM_USE_MEM_STATS
~FMemStats(){
plotState();
}
#endif
void plotState() const {
#ifdef SCALFMM_USE_MEM_STATS
printf("[SCALFMM-MEMSTAT] Total number of allocations %lld \n", numberOfAllocations);
printf("[SCALFMM-MEMSTAT] Memory used at the end %lu Bytes (%f MB)\n", FMemStats::controler.getCurrentAllocated(), FMemStats::controler.getCurrentAllocatedMB());
printf("[SCALFMM-MEMSTAT] Max memory used %lld Bytes (%f MB)\n", FMemStats::controler.getMaxAllocated(), FMemStats::controler.getMaxAllocatedMB());
printf("[SCALFMM-MEMSTAT] Total memory used %lld Bytes (%f MB)\n", FMemStats::controler.getTotalAllocated(), FMemStats::controler.getTotalAllocatedMB());
}
#else
printf("[SCALFMM-MEMSTAT] unused\n");
#endif
}
void allocate(const std::size_t size){
numberOfAllocations += 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment