Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MailboxPtr looks like a smart pointer, but it's not. Kill it.
[simgrid.git] / examples / s4u / cloud-simple / s4u-cloud-simple.cpp
index e8cd04a..08a341a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2019. 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. */
@@ -32,7 +32,7 @@ struct s_payload {
 
 static void communication_tx_fun(std::vector<std::string> args)
 {
-  simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(args.at(0));
+  simgrid::s4u::Mailbox* mbox   = simgrid::s4u::Mailbox::by_name(args.at(0));
   s_payload* payload            = new s_payload;
   payload->tx_actor_name        = simgrid::s4u::Actor::self()->get_cname();
   payload->tx_host              = simgrid::s4u::this_actor::get_host();
@@ -45,7 +45,7 @@ static void communication_rx_fun(std::vector<std::string> args)
 {
   const char* actor_name        = simgrid::s4u::Actor::self()->get_cname();
   const char* host_name         = simgrid::s4u::this_actor::get_host()->get_cname();
-  simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::by_name(args.at(0));
+  simgrid::s4u::Mailbox* mbox   = simgrid::s4u::Mailbox::by_name(args.at(0));
 
   struct s_payload* payload = static_cast<struct s_payload*>(mbox->get());
   double clock_end          = simgrid::s4u::Engine::get_clock();
@@ -193,7 +193,7 @@ static void master_main()
            " network one");
   XBT_INFO("### Relocate VM0 between PM0 and PM1");
   vm0 = new simgrid::s4u::VirtualMachine("VM0", pm0, 1);
-  vm0->setRamsize(1L * 1024 * 1024 * 1024); // 1GiB
+  vm0->set_ramsize(1L * 1024 * 1024 * 1024); // 1GiB
 
   vm0->start();
   launch_communication_worker(vm0, pm2);