- send_request_array =
- (MPI_Request *) xbt_malloc(2 * (size + pipe_length) * sizeof(MPI_Request));
- recv_request_array =
- (MPI_Request *) xbt_malloc((size + pipe_length) * sizeof(MPI_Request));
- send_status_array =
- (MPI_Status *) xbt_malloc(2 * (size + pipe_length) * sizeof(MPI_Status));
- recv_status_array =
- (MPI_Status *) xbt_malloc((size + pipe_length) * sizeof(MPI_Status));
-
-
+ MPI_Request* send_request_array = new MPI_Request[2 * (size + pipe_length)];
+ MPI_Request* recv_request_array = new MPI_Request[size + pipe_length];
+ MPI_Status* send_status_array = new MPI_Status[2 * (size + pipe_length)];
+ MPI_Status* recv_status_array = new MPI_Status[size + pipe_length];