Buffer Management for Networked .NET Applications

Found TCP: Buffer Management and related Async Sockets and Buffer Management and Async Sockets and Buffer Management [CTD] articles on Greg Young’s blog. These articles describe the problem and show the solution:

When you call BeginReceive/BeginSend on a socket, the memory that you pass to the method will be pinned for the duration of the call. This will lead to heap fragmentation and to make matters worse it will often be in your gen0 heap if you aren’t careful. This becomes especially true in the most common socket applications (request/response) as BeginReceive is often called and waits for a long time to receive data (by long time I mean a few seconds or more).

The blog itself is interesting on its own.

Advertisements

3 thoughts on “Buffer Management for Networked .NET Applications

  1. Hi Roman,
    Do you have the zip files of these links? The author site download link seem to be broken.
    Please send it to me if you still keep them.
    Thanks

  2. Hi! No, unfortunately I do not have them. :( I tried to post comment on Greg’s blog about the problem, but cannot get that working either… :(

  3. Where are the files?

    The link is there but nothing is on, I am redirected to the same page without source!!! Have you managed to get the files??

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s