-/*
- * jedule_events.c
- *
- * Created on: Nov 30, 2010
- * Author: sascha
- */
+/* Copyright (c) 2010-2014. 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 <stdio.h>
#include <stdlib.h>
void create_jed_event(jed_event_t *event, char *name, double start_time,
double end_time, const char *type) {
- *event = (jed_event_t) calloc(1, sizeof(s_jed_event_t));
+ *event = xbt_new0(s_jed_event_t,1);
(*event)->name = xbt_strdup(name);
(*event)->start_time = start_time;
(*event)->type = xbt_strdup(type);
- (*event)->resource_subsets = xbt_dynar_new(sizeof(jed_res_subset_t), NULL);
+ (*event)->resource_subsets = xbt_dynar_new(sizeof(jed_res_subset_t), xbt_free_ref);
(*event)->characteristics_list = xbt_dynar_new(sizeof(char*), NULL);
(*event)->info_hash = xbt_dict_new_homogeneous(NULL);