The MPI standard describes that buffered sends use the memory available in the buffer between the end of the active message queue and its beginning. Even if messages in the middle of the active message queue are completed, their memory is not reused until all messages before them are also completed.

This sample uses a buffer that is large enough to store three small messages, or two such small messages and a larger one. First, it demonstrates how the buffer is used correctly, then it shows how memory cannot be reused, because the initial message is not completed and blocks the buffer.

Usage Instructions:
System Requirements: