Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further reduce a MC test that's still too long
[simgrid.git] / teshsuite / smpi / gh-139 / gh-139.c
index 1c28fa7de990d9e669f8eb6eb9420cca4c13fcee..c397ae0ad498d8645780ff1020208e5221c304db 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2020. The SimGrid Team.
+/* Copyright (c) 2019-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@ static void thread_create_wrapper(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED
 
 static void mpi_thread_create(const char* name, void* (*f)(void*), void* param)
 {
-  struct threadwrap* threadwrap = (struct threadwrap*)malloc(sizeof(*threadwrap));
+  struct threadwrap* threadwrap = xbt_malloc(sizeof(*threadwrap));
   threadwrap->f                 = f;
   threadwrap->param             = param;
   sg_actor_t actor              = sg_actor_init(name, sg_host_self());
@@ -50,7 +50,7 @@ static void mpi_thread_create(const char* name, void* (*f)(void*), void* param)
 
 static void mythread_create(const char* name, MPI_Request* req, int rank)
 {
-  struct param* param = (struct param*)malloc(sizeof(*param));
+  struct param* param = xbt_malloc(sizeof(*param));
   param->req          = req;
   param->rank         = rank;
   mpi_thread_create(name, req_wait, param);