Index: sources/src/global_functions.cc
===================================================================
--- sources/src/global_functions.cc	(revision 63)
+++ sources/src/global_functions.cc	(revision 65)
@@ -232,76 +232,67 @@
     }
 
-    /*
-     * Initialize the signals table
-     */
-    create_signals_table();
-    bind_to_table();
-    if (dump_netlist_info) {
-        print_table(cerr);
-        cerr << endl;
-        print_table_stats(cerr);
-        cerr << endl;
-    }
-    // Init variables to be able to run combinational functions
-    pending_write_vector_capacity = get_signal_table_size();
-
-    assert(pending_write_vector_capacity != 0);
+  /*
+   * Initialize the signals table
+   */
+  create_signals_table ();
+  bind_to_table ();
+  if (dump_netlist_info)
+  {
+    print_table (cerr);
+    cerr << endl;
+    print_table_stats (cerr);
+    cerr << endl;
+  }
+
+  // Init variables to be able to run combinational functions
+  pending_write_vector_capacity = get_signal_table_size ();
+
+  assert(pending_write_vector_capacity != 0);
 
 #ifdef _OPENMP
-    #define LINE_SIZE 128L
-    int malloc_size = (sizeof (pending_write_t) * (pending_write_vector_capacity + 1) + (LINE_SIZE - 1)) & ~(LINE_SIZE - 1);
-    assert((sizeof(pending_write_t) * (pending_write_vector_capacity + 1)) <= malloc_size && "bad allocation size");
-
-    #pragma omp parallel
-    {
-        posix_memalign((void **) &pending_write_vector, LINE_SIZE, malloc_size);
-        pending_write_vector_nb = (int32_t *) &pending_write_vector[0];
-        pending_write_vector = &pending_write_vector[1];
-        //printf("malloc 0x%x @%p, idx @0x%x\n", malloc_size, pending_write_vector, pending_write_vector_nb);
-        *pending_write_vector_nb = 0;
-    }
+#define LINE_SIZE 128L
+  int malloc_size =
+      (sizeof (pending_write_t) * (pending_write_vector_capacity + 1) + (LINE_SIZE - 1)) & ~(LINE_SIZE - 1);
+  assert((sizeof (pending_write_t) * (pending_write_vector_capacity + 1)) <= malloc_size && "bad allocation size");
+
+#pragma omp parallel
+  {
+	  posix_memalign((void **)&pending_write_vector, LINE_SIZE, malloc_size);
+	  pending_write_vector_nb = (int32_t *)&pending_write_vector[0];
+	  pending_write_vector = &pending_write_vector[1];
+	  printf("malloc 0x%x @%p, idx @0x%x\n", malloc_size, pending_write_vector, pending_write_vector_nb);
+	  *pending_write_vector_nb = 0;
+  }
 #else
-    pending_write_vector = (pending_write_vector_t) malloc(sizeof(pending_write_t) * pending_write_vector_capacity);
-    pending_write_vector_nb = (int32_t *) malloc(sizeof(int32_t));
-    *pending_write_vector_nb = 0;
-#endif
-
-
-    // create the clock list
-    clock_list_t clock_list;
-    create_clock_list(clock_list, get_equi_list());
-    if (dump_netlist_info) {
-        cerr << "Clock list\n" << "----------\n" << clock_list << "\n\n";
-    }
-
-    // Check if a clock exists in the system
-    if (clock_list.empty()) {
-        cerr << "System need a clock.\n" <<
-            "Please define system clock using special type \"sc_clock\".\n";
-        exit(22);
-    }
-    // Check if any constructor wrote into registers
-    if (*pending_write_vector_nb != 0) {
-        cerr <<
-            "Error : Register/Signal writing is not allowed before sc_initialize.\n"
-            "Move initializations from constructors/sc_main to module reset sequences.\n";
-        // we are unable to dump register(s) name(s) 
-        // because the table binding is not yet completed.
-        exit(24);
-    }
-
-    string base_name = get_scheduling(scheduling_method);
-
-    if (dynamic_link_of_scheduling_code) {
-        compile_and_link(base_name.c_str());
-    }
-    else {
-        use_static_func();
-    }
-
-    *pending_write_vector_nb = 0;
-
-    check_all_ports();
-    usage.start();
+	pending_write_vector_nb = (int32_t *)malloc(sizeof(int32_t));
+	pending_write_vector = (pending_write_vector_t) 
+	    malloc(sizeof (pending_write_t) * pending_write_vector_capacity);
+#endif
+  
+  // create the clock list
+  clock_list_t clock_list;
+  create_clock_list (clock_list, get_equi_list ());
+  if (dump_netlist_info)
+    cerr << "Clock list\n"
+         << "----------\n"
+         << clock_list << "\n\n";
+  // Check if a clock exists in the system
+  if (clock_list.empty()) {
+      cerr << "System need a clock.\n" <<
+          "Please define system clock using special type \"sc_clock\".\n";
+      exit(22);
+  }
+
+  string base_name = get_scheduling (scheduling_method);
+
+  if (dynamic_link_of_scheduling_code)
+    compile_and_link (base_name.c_str());
+  else
+    use_static_func ();
+  
+  *pending_write_vector_nb = 0;
+ 
+  check_all_ports ();
+  usage.start ();
 
     if (dump_stage) {
