You know, I have some doubts about the memory profiler here. The memory management system in .NET is actually trying to defragment the heap for you while navigating through memory (so you need to attach memory for sharing with an external DLL).
Larger memory allocations taken over longer periods of time are subject to greater fragmentation. Although small ephemeral (short) memory requests are unlikely to cause fragmentation in .NET.
It is also worth considering. With the current GC.NET, memory allocated close in time is usually located at a distance from each other in space. Which is the opposite of fragmentation. those. you must allocate memory the way you want to access it.
Is it just managed code or does it contain things like P / Invoke, unmanaged memory (Marshal.AllocHGlobal), or something like GCHandle.Alloc (obj, GCHandleType.Pinned)?
John Leidegren Mar 09 '11 at 9:12 2011-03-09 09:12
source share