Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix copyright headers
[simgrid.git] / src / bindings / rubyDag / rb_SD_task.c
index d3f75d9..076599f 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+  * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "rb_SD_task.h"
 
 // Free Method
@@ -52,8 +58,8 @@ static void rb_SD_task_schedule(VALUE class,VALUE task,VALUE workstation_nb,VALU
   ptr_comm = RARRAY(communication_amount)->ptr;
   
   wrk_list = xbt_new0(SD_workstation_t,wrk_nb);
-  comp_amount = xbt_new0(double,wrk_nb);//malloc(sizeof(double)*wrk_nb); //xbt_new0(double,wrk_nb);
-  comm_amount = xbt_new0(double,wrk_nb);//malloc(sizeof(double)*wrk_nb); //xbt_new0(double,wrk_nb);
+  comp_amount = xbt_new0(double,wrk_nb);
+  comm_amount = xbt_new0(double,wrk_nb);
   
   // wrk_nb == comp_nb == comm_nb ???
   for (i=0;i<wrk_nb;i++)
@@ -68,13 +74,11 @@ static void rb_SD_task_schedule(VALUE class,VALUE task,VALUE workstation_nb,VALU
   for (i=0;i<comm_nb;i++)
     comm_amount[i] = NUM2DBL(ptr_comm[i]);*/
   
-  
   SD_task_schedule(tk,wrk_nb,wrk_list,comp_amount,comm_amount,rt);
   
   xbt_free(wrk_list);
-  // FIXME, used later if wanna calculate start & fininsh time for a task
-  free(comp_amount);
-  free(comm_amount);
+  xbt_free(comp_amount);
+  xbt_free(comm_amount);
   
 
 }