title: What causes memory fragmentation in .NET
body: <p>I am using Red Gates ANTS memory profiler to debug a memory leak. It keeps warning me that:</p>
  
  <blockquote>
    <p>Memory Fragmentation may be causing
    .NET to reserver too much free memory.</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>Memory Fragmentation is affecting the size of the largest object that can be allocated</p>
  </blockquote>
  
  <p>Because I have OCD, this problem must be resolved. </p>
  
  <p>What are some standard coding practices that help avoid memory fragmentation.
  Can you defragment it through some .NET methods? Would it even help?</p>