Questions tagged [buffer-manager]

6 questions
15
votes
3 answers

How can I prevent BufferManager / PooledBufferManager in my WCF client app from wasting memory?

Analyzing a WCF client application (that I did not write and still do not know too much about) that talks to a bunch of services via SOAP and after running for a couple of days will throw an OutOfMemoryException, I found out that .net's…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156
8
votes
2 answers

Is System.ServiceModel.Channels.BufferManager thread-safe?

I create a buffer manager through static member of BufferManager.CreateBufferManager. This new created BufferManager is used by multiple threads. Should I use a lock with TakeBuffer() and ReturnBuffer() or it is thread-safe by design ?
Xaqron
  • 29,931
  • 42
  • 140
  • 205
6
votes
1 answer

A real-world use case for BufferManager

Trying to get to the bottom of an OutOfMemoryException I found that .net's BufferManagers, used by WCF's buffered TransferMode, were responsible for wasting literally hundreds of megabytes (see the question and my own answer on How can I prevent…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156
3
votes
1 answer

How can I clear the PooledBufferManager for my used once WCF HTTP client?

I have a WCF client application which makes a single service call with a very large response (1GB). I'm finding making this service call uses a lot of memory (500MB) which seems to never get reclaimed even though the response objects are no longer…
KrisG
  • 533
  • 4
  • 13
1
vote
1 answer

WCF BufferManager ReturnBuffer vs. Clear

I am using BufferManager in my WCF service. I created my own class to wrap around the BufferManager which implements IDisposable. Right now my Dispose method looks like this: public void Dispose() { this.bufferManager.Clear(); …
lintmouse
  • 5,079
  • 8
  • 38
  • 54
0
votes
1 answer

What does Azure Storage BufferManager do, and how/when do I implement it?

The documentation on MSDN for cloudBlobClient.BufferManager describes that this buffer manager improves performance for high-scale applications. My understanding is that this buffer manager reduces pressure on the GC for many small transactions…