X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0827712fd9204c222e357ab38a6dd097301ed6bb..596e36117322c22fd31372e7803bc197bcd4a016:/teshsuite/smpi/gh-139/gh-139.c diff --git a/teshsuite/smpi/gh-139/gh-139.c b/teshsuite/smpi/gh-139/gh-139.c index 1c28fa7de9..68e9b5c8ee 100644 --- a/teshsuite/smpi/gh-139/gh-139.c +++ b/teshsuite/smpi/gh-139/gh-139.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2019-2020. The SimGrid Team. +/* Copyright (c) 2019-2023. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -35,12 +35,12 @@ static void thread_create_wrapper(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED the_global_rank); SMPI_thread_create(); t->f(t->param); - free(t); + xbt_free(t); } 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); @@ -73,7 +73,7 @@ void* req_wait(void* bar) MPI_Error_string(ret, err_string, &length); XBT_INFO("%d request done, return %s", rank, err_string); XBT_INFO("%d still has MPI rank %d and global variable %d", param->rank, rank, global_rank); - free(param); + xbt_free(param); return NULL; }