Ignore:
Timestamp:
12/09/21 12:28:20 (3 years ago)
Author:
ymipsl
Message:

Tracking memory leak : release memory statically alocated

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/server.cpp

    r2266 r2274  
    2121#include <cstdio> 
    2222#include "workflow_graph.hpp" 
     23#include "release_static_allocation.hpp" 
     24 
    2325 
    2426 
     
    207209 
    208210      // Delete CContext 
    209       CObjectTemplate<CContext>::cleanStaticDataStructure(); 
     211      //CObjectTemplate<CContext>::cleanStaticDataStructure(); 
    210212    } 
    211213 
     
    314316//      MPI_Comm_free(&intraComm); 
    315317      CXios::finalizeDaemonsManager(); 
    316       CContext::removeAllContexts() ; // free memory for related context  
    317        
     318      finalizeServersRessource(); 
     319       
     320      CContext::removeAllContexts() ; // free memory for related context 
     321           
    318322      if (!is_MPI_Initialized) 
    319323      { 
     
    325329      report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ; 
    326330      report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
    327  
     331       
    328332      CWorkflowGraph::drawWorkFlowGraph_server(); 
     333      xios::releaseStaticAllocation() ; // free memory from static allocation 
    329334    } 
    330335 
     
    420425      serversRessource_ = new CServersRessource(serverComm) ; 
    421426    } 
     427 
     428    void  CServer::finalizeServersRessource(void)  
     429    {  
     430      delete serversRessource_; serversRessource_=nullptr ; 
     431    } 
    422432} 
Note: See TracChangeset for help on using the changeset viewer.