X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/437bf547e2d10fe55fae091a13675303aaa4ff32..152117af2fbcf4c99d0da5d10a6813aac7eee007:/examples/msg/masterslave/masterslave_platfgen.c diff --git a/examples/msg/masterslave/masterslave_platfgen.c b/examples/msg/masterslave/masterslave_platfgen.c index d9d8131f44..9d8f3cd425 100644 --- a/examples/msg/masterslave/masterslave_platfgen.c +++ b/examples/msg/masterslave/masterslave_platfgen.c @@ -23,8 +23,8 @@ void promoter_1(context_node_t node) { s_sg_platf_host_cbarg_t host_parameters; host_parameters.id = NULL; - host_parameters.power_peak = 1000000; - + host_parameters.power_peak = xbt_dynar_new(sizeof(double), NULL); + xbt_dynar_push_as(host_parameters.power_peak, double, 1000000.0); host_parameters.core_amount = 1; host_parameters.power_scale = 1; host_parameters.power_trace = NULL; @@ -210,7 +210,7 @@ int main(int argc, char **argv) { msg_host_t host = NULL; msg_host_t host_master = NULL; xbt_dynar_t host_dynar = MSG_hosts_as_dynar(); - char** hostname_list = malloc(sizeof(char*) * xbt_dynar_length(host_dynar)); + char** hostname_list = xbt_malloc(sizeof(char*) * xbt_dynar_length(host_dynar)); xbt_dynar_foreach(host_dynar, i, host) { MSG_process_create("slave", slave, NULL, host);