Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp	(revision 128)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/include/Parameters.h"
+#include "Behavioural/include/Allocation.h"
 #include "Common/include/Max.h"
 
@@ -110,9 +111,9 @@
     uint32_t size_instruction_address   = size_general_data - 2;
 
-    _array_size_depth                   = new uint32_t [_nb_context];
+    ALLOC1(_array_size_depth            ,uint32_t,_nb_context);
     for (uint32_t i=0; i<_nb_context; i++)
       _array_size_depth [i] = log2(_upt_size_queue[i]);
     
-    _array_size_nb_inst_decod = new uint32_t [_nb_decod_unit];
+    ALLOC1(_array_size_nb_inst_decod    ,uint32_t,_nb_decod_unit);
     for (uint32_t i=0; i<_nb_decod_unit; i++)
       _array_size_nb_inst_decod [i] = log2(_size_decod_queue[i]+1);
@@ -159,15 +160,15 @@
        );
 
-    _translate_context_id_from_decod_unit= new std::vector<uint32_t> [_nb_decod_unit];
+    ALLOC1(_translate_context_id_from_decod_unit,std::vector<uint32_t>,_nb_decod_unit);
 
     for (uint32_t i=0; i<_nb_context; ++i)
       _translate_context_id_from_decod_unit [_link_context_to_decod_unit[i]].push_back(i);
 
-    _decod_unit_nb_context               = new uint32_t    [_nb_decod_unit];
-    _decod_unit_nb_inst_fetch            = new uint32_t *  [_nb_decod_unit];
-    _decod_unit_nb_branch_speculated     = new uint32_t *  [_nb_decod_unit];
-//     _decod_unit_depth                    = new uint32_t *  [_nb_decod_unit];
-    _decod_unit_instruction_implemeted   = new bool     ** [_nb_decod_unit];
-//     _have_port_decod_unit_context_id     = new bool        [_nb_decod_unit];
+    ALLOC1(_decod_unit_nb_context            ,uint32_t,_nb_decod_unit);
+    ALLOC2(_decod_unit_nb_inst_fetch         ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
+    ALLOC2(_decod_unit_nb_branch_speculated  ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
+//  ALLOC2(_decod_unit_depth                 ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
+    ALLOC3(_decod_unit_instruction_implemeted,bool    ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size(),NB_INSTRUCTION);
+//  ALLOC2(_have_port_decod_unit_context_id  ,bool    ,_nb_decod_unit);
     _sum_inst_decod                      = 0;
     
@@ -179,9 +180,5 @@
 
         _decod_unit_nb_context             [i] = size;
-        _decod_unit_nb_inst_fetch          [i] = new uint32_t   [size];
-//         _decod_unit_depth                  [i] = new uint32_t   [size];
-        _decod_unit_nb_branch_speculated   [i] = new uint32_t   [size];
-        _decod_unit_instruction_implemeted [i] = new bool     * [size];
-//         _have_port_decod_unit_context_id   [i] = size > 0;
+//      _have_port_decod_unit_context_id   [i] = size > 0;
 
         for (uint32_t j=0; j<size; ++j)
@@ -191,6 +188,5 @@
             _decod_unit_nb_inst_fetch          [i][j] = _nb_inst_fetch  [x];
             _decod_unit_nb_branch_speculated   [i][j] = _upt_size_queue [x];
-//             _decod_unit_depth                  [i][j] = log2(_upt_size_queue[x]);
-            _decod_unit_instruction_implemeted [i][j] = new bool [NB_INSTRUCTION];
+//          _decod_unit_depth                  [i][j] = log2(_upt_size_queue[x]);
 
             for (uint32_t k=0; k<NB_INSTRUCTION; ++k)
@@ -302,25 +298,14 @@
     delete [] _param_ifetch_unit    ;
 
-//     delete [] _size_ifetch_queue_ptr;
-//     delete [] _size_nb_inst_decod;
-    delete [] _array_size_depth;
-    for (uint32_t i=0; i<_nb_context; ++i)
-      {
-        for (uint32_t j=0; j<_translate_context_id_from_decod_unit [i].size(); ++j)
-          delete [] _decod_unit_instruction_implemeted [i][j];
-
-        delete [] _decod_unit_nb_inst_fetch          [i];
-//         delete [] _decod_unit_depth                  [i];
-        delete [] _decod_unit_nb_branch_speculated   [i];
-        delete [] _decod_unit_instruction_implemeted [i];
-      }
-    delete [] _decod_unit_nb_inst_fetch         ;
-//     delete [] _decod_unit_depth                 ;
-    delete [] _decod_unit_nb_branch_speculated  ;
-    delete [] _decod_unit_instruction_implemeted;
-
-//     delete [] _have_port_decod_unit_context_id;
-    delete [] _decod_unit_nb_context               ;
-    delete [] _translate_context_id_from_decod_unit;
+//  DELETE2(_have_port_decod_unit_context_id     ,_nb_decod_unit);
+    DELETE3(_decod_unit_instruction_implemeted   ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size(),NB_INSTRUCTION);
+//  DELETE2(_decod_unit_depth                    ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
+    DELETE2(_decod_unit_nb_branch_speculated     ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
+    DELETE2(_decod_unit_nb_inst_fetch            ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size());
+    DELETE1(_decod_unit_nb_context               ,_nb_decod_unit);
+
+    DELETE1(_translate_context_id_from_decod_unit,_nb_decod_unit);
+    DELETE1(_array_size_nb_inst_decod            ,_nb_decod_unit);
+    DELETE1(_array_size_depth                    ,_nb_context);
 
     log_end(Front_end,FUNCTION);
