title: Efficiently scanning memory of a process
body: <p>Recently I've put together a C# class that can read and write bytes in another processes memory using API calls etc. as I'm sure you've all seen before.</p>
  
  <p>My question however relates to how I can efficiently scan the memory of another process?  I know the basic method of testing each group of 4 bytes until you reach Int32.MaxValue, but I've found it is (as you may imagine) incredibly time and resource consuming.</p>
  
  <p>From what I've read, there is a way to determine the allocated addresses of a process by doing a "HeapWalk".  Can anyone provide me with some code examples and/or information about this and what would be the best way of going about it?</p>