From c39e93eb71e3b0dd62a74c3deeff666d34de725b Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Thu, 4 Sep 2014 18:37:43 +0200 Subject: [PATCH] don't use calloc for these buffers Initializing them to 0 made them use physical memory, while letting them uninitialized, (and unused as in replay we may not need them) puts them in virtual memory --- src/smpi/smpi_replay.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index 452660c2c0..427604af31 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -591,8 +591,8 @@ static void action_allToAll(const char *const *action) { MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE; MPI_CURRENT_TYPE2=MPI_DEFAULT_TYPE; } - void *send = calloc(send_size*comm_size, smpi_datatype_size(MPI_CURRENT_TYPE)); - void *recv = calloc(recv_size*comm_size, smpi_datatype_size(MPI_CURRENT_TYPE2)); + void *send = xbt_malloc(send_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE)); + void *recv = xbt_malloc(recv_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE2)); #ifdef HAVE_TRACING int rank = smpi_process_index(); @@ -643,14 +643,14 @@ static void action_gather(const char *const *action) { MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE; MPI_CURRENT_TYPE2=MPI_DEFAULT_TYPE; } - void *send = calloc(send_size, smpi_datatype_size(MPI_CURRENT_TYPE)); + void *send = xbt_malloc(send_size* smpi_datatype_size(MPI_CURRENT_TYPE)); void *recv = NULL; int root=atoi(action[4]); int rank = smpi_process_index(); if(rank==root) - recv = calloc(recv_size*comm_size, smpi_datatype_size(MPI_CURRENT_TYPE2)); + recv = xbt_malloc(recv_size*comm_size* smpi_datatype_size(MPI_CURRENT_TYPE2)); #ifdef HAVE_TRACING instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1); @@ -706,7 +706,7 @@ static void action_gatherv(const char *const *action) { MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE; MPI_CURRENT_TYPE2=MPI_DEFAULT_TYPE; } - void *send = calloc(send_size, smpi_datatype_size(MPI_CURRENT_TYPE)); + void *send = xbt_malloc(send_size* smpi_datatype_size(MPI_CURRENT_TYPE)); void *recv = NULL; for(i=0;i