Example #1
0
        public RemoteAllocation Allocate(int size, MemoryProtectionFlags protection, bool mustBeDisposed = true)
        {
            var memory = new RemoteAllocation(m_Process, size, protection, mustBeDisposed);

            m_RemoteAllocations.Add(memory);
            return(memory);
        }
Example #2
0
 public void Deallocate(RemoteAllocation allocation)
 {
     if (m_RemoteAllocations.Contains(allocation))
     {
         m_RemoteAllocations.Remove(allocation);
     }
     if (!allocation.IsDisposed)
     {
         allocation.Dispose();
     }
 }