Memory leak in buffermanager(?) (SuperSocket.Common lib)



I noticed the memory kept on ricing when using the websocket server.
So I did a performance and diagnostic test for the memory. Seems SuperSocket.Common.BufferManager.InitBuffer uses almost all memory (see image in attachment).

SuperSocket is a library provided without source code. I have tried implementing your supersocket project (with source code) before, but it seems to differ from the supersocket library used in superWebsocket. Could you provide the source code for superSocket used with SuperWebSocket?

Are you familiar with this leak? Is it a leak? How can I best handle this? Even after closing the connection, the memory does not drop.
Kind regards,


added screendump of memorydump

file attachments


kerryjiang wrote Feb 13, 2015 at 11:57 AM

It's not memory leak. It always pre-allocate some memory as a pool. It won't increase no limitation.

mldz wrote Feb 13, 2015 at 1:21 PM

Thank you for the fast response.
" It won't increase no limitation" OK. is there a max value which can be set?
Would it be possible for the next websocket source code release to add the source code of the used supersocket in the solution?
Kind regards,


kerryjiang wrote Feb 13, 2015 at 11:45 PM

Yes, maxConnectionNumber * receiveBufferSize.

mldz wrote Feb 14, 2015 at 7:59 AM

ok. clear. thanks