When the message has reached the end of its life, we try to return the buffer that was used for storage. WCF will successfully return a buffer if the shared memory held by the pool on return is <= MaxBufferPoolSize.
Similarly, when creating / receiving a message, WCF tries to take a buffer from the pool, and if the pool does not have a buffer of this size, we allocate it using GC. The maximum size for highlighting in buffer mode is protected by the size of MaxReceivedMessage.
You can check the memory usage in your application and look at the GC performance counters, and you will see that there will be a lot of time in allocating and collecting GC, because WCF will not be able to combine these buffers.
Hope this was helpful.
source share