Reputation: 10552
In a previous question I asked possible programatic ways of maximising the largest block allocatable on the LOH. I'm still seeing the problems, but now I'm trying to get my head around why the LOH seems to grow and shrink in size, yet I'm still seeing OutOfMemoryExceptions that tally with what others have reported as being due to LOH fragmentation.
Why might one call to, for example, StringBuilder.EnsureCapacity throw an OutOfMemoryException for me, but another call from somewhere else result in the LOH expanding in size (according to the performance counters, it is growing and shrinking)?
Upvotes: 1
Views: 476
Reputation: 2849
I went to the original article and posted what I think might be your problem there. Go check it out.
Upvotes: 0
Reputation: 292
im not sure but i would try 2 ways:
edit: a 3rd way may be to create more appdomains and to handle that big stuff in that extra appdomains.
Upvotes: 2