A workaround for FreeBSD pthread mallc/free bug.
On FreeBSD, test threads/pt2pt/multisend4 sometimes reports the segfault error when calling free function. This error only happens when the buffer size is equal to 4M bytes and every thread performs malloc/free for multiple times. This bug can be reproduced by using simple memcpy without MPI communication, thus it is considered not as a MPI bug but a bug of the thread-safe memory allocation on FreeBSD. A workaround of this bug is to move malloc-free outside the loop to avoid frequent malloc-free calls. This patch added it. Signed-off-by: Huiwei Lu <firstname.lastname@example.org>