if (sd_global->link_list == NULL) { /* this is the first time the function is called */
sd_global->link_list = xbt_new(SD_link_t, sd_global->link_count);
if (sd_global->link_list == NULL) { /* this is the first time the function is called */
sd_global->link_list = xbt_new(SD_link_t, sd_global->link_count);