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); }
public void Deallocate(RemoteAllocation allocation) { if (m_RemoteAllocations.Contains(allocation)) { m_RemoteAllocations.Remove(allocation); } if (!allocation.IsDisposed) { allocation.Dispose(); } }