C# Class Binarysharp.MemoryManagement.Memory.MemoryFactory

Class providing tools for manipulating memory space.
Inheritance: IFactory
Show file Open project: ZenLulz/MemorySharp

Protected Properties

Property Type Description
InternalRemoteAllocations List
MemorySharp MemorySharp

Public Methods

Method Description
Allocate ( int size, MemoryProtectionFlags protection = MemoryProtectionFlags.ExecuteReadWrite, bool mustBeDisposed = true ) : RemoteAllocation

Allocates a region of memory within the virtual address space of the remote process.

Deallocate ( RemoteAllocation allocation ) : void

Deallocates a region of memory previously allocated within the virtual address space of the remote process.

Dispose ( ) : void

Releases all resources used by the MemoryFactory object.

Private Methods

Method Description
MemoryFactory ( MemorySharp memorySharp ) : System

Initializes a new instance of the MemoryFactory class.

Method Details

Allocate() public method

Allocates a region of memory within the virtual address space of the remote process.
public Allocate ( int size, MemoryProtectionFlags protection = MemoryProtectionFlags.ExecuteReadWrite, bool mustBeDisposed = true ) : RemoteAllocation
size int The size of the memory to allocate.
protection MemoryProtectionFlags The protection of the memory to allocate.
mustBeDisposed bool The allocated memory will be released when the finalizer collects the object.
return RemoteAllocation

Deallocate() public method

Deallocates a region of memory previously allocated within the virtual address space of the remote process.
public Deallocate ( RemoteAllocation allocation ) : void
allocation RemoteAllocation The allocated memory to release.
return void

Dispose() public method

Releases all resources used by the MemoryFactory object.
public Dispose ( ) : void
return void

Property Details

InternalRemoteAllocations protected property

The list containing all allocated memory.
protected List InternalRemoteAllocations
return List

MemorySharp protected property

The reference of the MemorySharp object.
protected MemorySharp MemorySharp
return MemorySharp