A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not declare empty sets
[simgrid.git]
/
examples
/
msg
/
cloud
/
simple_vm.c
diff --git
a/examples/msg/cloud/simple_vm.c
b/examples/msg/cloud/simple_vm.c
index
e61c01c
..
aac646c
100644
(file)
--- a/
examples/msg/cloud/simple_vm.c
+++ b/
examples/msg/cloud/simple_vm.c
@@
-1,10
+1,11
@@
-/* Copyright (c) 2007-2012. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2015. 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>
/* 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 "
msg
/msg.h"
+#include "
simgrid
/msg.h"
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
#include "xbt/sysdep.h" /* calloc, printf */
/* Create a log channel to have nice outputs. */
@@
-85,6
+86,7
@@
static int communication_rx_fun(int argc, char *argv[])
MSG_process_get_name(priv->tx_proc),
host_name, pr_name, clock_end - priv->clock_sta);
MSG_process_get_name(priv->tx_proc),
host_name, pr_name, clock_end - priv->clock_sta);
+ xbt_free(priv);
MSG_task_destroy(task);
return 0;
MSG_task_destroy(task);
return 0;
@@
-252,6
+254,12
@@
static int master_main(int argc, char *argv[])
XBT_INFO("## Test 6 (started): Check migration impact (not yet implemented neither on the CPU resource nor on the network one");
XBT_INFO("### Relocate VM0 between PM0 and PM1");
vm0 = MSG_vm_create_core(pm0, "VM0");
XBT_INFO("## Test 6 (started): Check migration impact (not yet implemented neither on the CPU resource nor on the network one");
XBT_INFO("### Relocate VM0 between PM0 and PM1");
vm0 = MSG_vm_create_core(pm0, "VM0");
+ {
+ s_vm_params_t params;
+ memset(¶ms, 0, sizeof(params));
+ params.ramsize = 1L * 1024 * 1024 * 1024; // 1Gbytes
+ MSG_host_set_params(vm0, ¶ms);
+ }
MSG_vm_start(vm0);
launch_communication_worker(vm0, pm2);
MSG_process_sleep(0.01);
MSG_vm_start(vm0);
launch_communication_worker(vm0, pm2);
MSG_process_sleep(0.01);
@@
-262,6
+270,7
@@
static int master_main(int argc, char *argv[])
MSG_vm_destroy(vm0);
XBT_INFO("## Test 6 (ended)");
MSG_vm_destroy(vm0);
XBT_INFO("## Test 6 (ended)");
+ xbt_dynar_free(&hosts_dynar);
return 0;
}
return 0;
}
@@
-291,7
+300,7
@@
int main(int argc, char *argv[])
int res = MSG_main();
XBT_INFO("Bye (simulation time %g)", MSG_get_clock());
int res = MSG_main();
XBT_INFO("Bye (simulation time %g)", MSG_get_clock());
-
+ xbt_dynar_free(&hosts_dynar);
return !(res == MSG_OK);
}
return !(res == MSG_OK);
}