src/components/rocm_smi/linux-rocm-smi.c
// Triggered by PAPI_shutdown() and frees memory.
Triggered by PAPI_shutdown() and frees memory.
Triggered by PAPI_shutdown () and frees memory .
static int _rocm_smi_shutdown_component(void)
{
    int i;
    SUBDBG("Entering _rocm_smi_shutdown_component\n");
    for (i=0; i<TotalEvents; i++) {
        if (AllEvents[i].vptr != NULL) free(AllEvents[i].vptr); 
    }
    free(AllEvents);    AllEvents    = NULL;
    free(CurrentIdx);   CurrentIdx   = NULL;
    free(CurrentValue); CurrentValue = NULL;
    free(ScanEvents);   ScanEvents   = NULL;
    free(FreqTable);    FreqTable    = NULL;
    free(PCITable);     PCITable     = NULL;
    dlclose(dl1);
    return (PAPI_OK);
}
static int _rocm_smi_shutdown_component ( void ) { int i ; SUBDBG ( " \n " ) ; for ( i = 0 ; i < TotalEvents ; i ++ ) { if ( AllEvents [ i ] . vptr != NULL ) free ( AllEvents [ i ] . vptr ) ; } free ( AllEvents ) ; AllEvents = NULL ; free ( CurrentIdx ) ; CurrentIdx = NULL ; free ( CurrentValue ) ; CurrentValue = NULL ; free ( ScanEvents ) ; ScanEvents = NULL ; free ( FreqTable ) ; FreqTable = NULL ; free ( PCITable ) ; PCITable = NULL ; dlclose ( dl1 ) ; return ( PAPI_OK ) ; }
Triggered by PAPI_shutdown() and frees memory.
Triggered by PAPI_shutdown () and frees memory .
// Free memories. // Free event memory. // close the dynamic libraries needed by this component.