Changeset 512


Ignore:
Timestamp:
Sep 3, 2013, 1:51:37 PM (11 years ago)
Author:
meunier
Message:

Tried to supress a few errors from valgrind; added corresponding delete and free in destructors (tsar_generic_xbar/top.cpp, tsar_xbar_cluster, vci_mem_cache)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/generic_llsc_global_table/include/generic_llsc_global_table.h

    r482 r512  
    319319    {
    320320        // making all slots available by reseting all valid bits
    321         std::memset(r_val, 0, sizeof(*r_val)*nb_slots);
     321        std::memset(r_val,  0, sizeof((*r_val) * nb_slots));
     322        std::memset(r_addr, 0, sizeof((*r_addr) * nb_slots));
     323        std::memset(r_key,  0, sizeof((*r_key) * nb_slots));
    322324
    323325        // init registers
  • trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp

    r509 r512  
    777777    /////////////////////////////////
    778778    {
     779        delete [] m_seg;
     780
    779781        delete [] r_ixr_rsp_to_xram_rsp_rok;
    780 
    781782        delete [] r_xram_rsp_victim_data;
    782783        delete [] r_xram_rsp_to_tgt_rsp_data;
     
    788789        delete [] r_write_be;
    789790        delete [] r_write_to_cc_send_data;
     791        delete [] r_write_to_cc_send_be;
     792
     793        delete [] r_cas_data;
     794        delete [] r_cas_rdata;
     795
     796        delete [] r_ixr_cmd_wdata;
     797        delete [] m_debug_previous_data;
     798        delete [] m_debug_data;
     799
    790800        print_stats();
    791801    }
     
    27322742
    27332743                            size_t index    = r_write_word_index.read();
    2734                             bool sc_success = m_llsc_table.sc(r_write_address.read()    ,
     2744                            bool sc_success = m_llsc_table.sc(r_write_address.read(),
    27352745                                    r_write_data[index].read());
    27362746
  • trunk/platforms/tsar_generic_xbar/top.cpp

    r508 r512  
    951951
    952952   
     953   // Free memory
    953954   for (size_t i = 0; i  < (XMAX * YMAX); i++)
    954955   {
     
    957958      delete clusters[x][y];
    958959   }
     960
     961   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_inc, XMAX - 1, YMAX, 3);
     962   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_dec, XMAX - 1, YMAX, 3);
     963   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_inc, XMAX - 1, YMAX, 2);
     964   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_dec, XMAX - 1, YMAX, 2);
     965   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_inc, XMAX, YMAX - 1, 3);
     966   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_dec, XMAX, YMAX - 1, 3);
     967   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_inc, XMAX, YMAX - 1, 2);
     968   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_dec, XMAX, YMAX - 1, 2);
     969   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_false_cmd_in, XMAX, YMAX, 4, 3);
     970   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_false_cmd_out, XMAX, YMAX, 4, 3);
     971   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_false_rsp_in, XMAX, YMAX, 4, 2);
     972   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_false_rsp_out, XMAX, YMAX, 4, 2);
    959973
    960974   return EXIT_SUCCESS;
  • trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp

    r508 r512  
    789789                                                 vci_param_ext>::~TsarXbarCluster() {
    790790
     791    dealloc_elems<DspinInput<dspin_cmd_width> > (p_cmd_in, 4, 3);
     792    dealloc_elems<DspinOutput<dspin_cmd_width> >(p_cmd_out, 4, 3);
     793    dealloc_elems<DspinInput<dspin_rsp_width> > (p_rsp_in, 4, 2);
     794    dealloc_elems<DspinOutput<dspin_rsp_width> >(p_rsp_out, 4, 2);
     795
    791796    for (size_t p = 0; p < n_procs; p++)
    792797    {
Note: See TracChangeset for help on using the changeset viewer.