Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
me finds malloc within macro, me killkill it
[simgrid.git] / include / gras / process.h
index ded4ad7..272c4d2 100644 (file)
@@ -55,7 +55,7 @@ void gras_userdata_set(void *ud);
  * Malloc and set the data associated with the current process.
  */
 
-#define gras_userdata_new(type) (gras_userdata_set(malloc(sizeof(type))),gras_userdata_get())
+#define gras_userdata_new(type) (gras_userdata_set(gras_new0(type,1)),gras_userdata_get())
 
 END_DECL