Virtual Bytes vs Private Bytes

  • Thread starter Thread starter Fritz
  • Start date Start date
F

Fritz

I am currently dealing with OutOfMemory exception issues. I believe
the root of the issue for us is LOH fragmentation (using XP 32bit
and .NET 2.0). I've reduced the large object allocations significantly
(but not completely) and have had some success. However, I am trying
to further understand why the virtual memory is still so much larger
than private bytes. From using perfmon, I can see my private bytes is
hovering around 700MB, but my virtual memory is around 1.7GB. LOH is
around 100MB and the other managed heaps total for about 350MB (for
450MB total). Prior to my code changes the SOH to LOH relationship
was reversed. Is this still LOH fragmentation or is this how the .NET
CLR manages memory or is it a bug with the CLR (I've found some
articles suggesting issues with .NEt 2.0 on XP) or something else? If
anyone has comments or suggestions that would be much appreciated.

- Fritz
 
[...] From using perfmon, I can see my private bytes is
hovering around 700MB, but my virtual memory is around 1.7GB. LOH is
around 100MB and the other managed heaps total for about 350MB (for
450MB total). Prior to my code changes the SOH to LOH relationship
was reversed. Is this still LOH fragmentation or is this how the .NET
CLR manages memory or is it a bug with the CLR (I've found some
articles suggesting issues with .NEt 2.0 on XP) or something else? If
anyone has comments or suggestions that would be much appreciated.

..NET manages its heap independently of your own managed code's use of
memory. It won't necessarily release memory back to the OS right away, or
even ever, even if your managed code is no longer using it.

Pete
 
Back
Top