src/components/sde/sde.c
// This function neither frees the allocated, nor does it zero it. It only resets the counter of used entries so that
// the allocated space can be resused (and overwritten) by future calls to record().
This function neither frees the allocated, nor does it zero it. It only resets the counter of used entries so that
the allocated space can be resused (and overwritten) by future calls to record().
This function neither frees the allocated nor does it zero it . It only resets the counter of used entries so that the allocated space can be resused ( and overwritten ) by future calls to record () .
int 
__attribute__((visibility("default")))
papi_sde_reset_recorder( void *record_handle )
{
    sde_counter_t *tmp_rcrdr;
    papi_sde_lock();
    tmp_rcrdr = (sde_counter_t *)record_handle;
    if( NULL == tmp_rcrdr || NULL == tmp_rcrdr->recorder_data ){
        papi_sde_unlock();
        PAPIERROR("papi_sde_record(): 'record_handle' is clobbered. Unable to reset recorder.\n");
        return PAPI_EINVAL;
    }
    tmp_rcrdr->recorder_data->used_entries = 0;
    free( tmp_rcrdr->recorder_data->sorted_buffer );
    tmp_rcrdr->recorder_data->sorted_buffer = NULL;
    tmp_rcrdr->recorder_data->sorted_entries = 0;
    papi_sde_unlock();
    return PAPI_OK;
}
int __attribute__ ( ( visibility ( " " ) ) ) papi_sde_reset_recorder ( void * record_handle ) { sde_counter_t * tmp_rcrdr ; papi_sde_lock ( ) ; tmp_rcrdr = ( sde_counter_t * ) record_handle ; if ( NULL == tmp_rcrdr || NULL == tmp_rcrdr -> recorder_data ) { papi_sde_unlock ( ) ; PAPIERROR ( " \n " ) ; return PAPI_EINVAL ; } tmp_rcrdr -> recorder_data -> used_entries = 0 ; free ( tmp_rcrdr -> recorder_data -> sorted_buffer ) ; tmp_rcrdr -> recorder_data -> sorted_buffer = NULL ; tmp_rcrdr -> recorder_data -> sorted_entries = 0 ; papi_sde_unlock ( ) ; return PAPI_OK ; }
This function neither frees the allocated, nor does it zero it.
This function neither frees the allocated nor does it zero it .
// NOTE: do _not_ free the chunks and do _not_ reset "recorder_data->total_entries"