C# 클래스 GSF.IO.Unmanaged.MemoryPoolPageList

Maintains a list of all of the memory allocations for the buffer pool.
This class is not thread safe.
상속: IDisposable
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MemoryPoolCeiling long
PageSize int

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes of all of the memory on the list.

GrowMemoryPool ( long size ) : bool

Grows the buffer pool to have the desired size

MemoryPoolPageList ( int pageSize, long maximumBufferSize ) : System

Create a thread safe list of MemoryPool pages.

ReleasePage ( int index ) : void

Releases a block back to the pool so it can be re-allocated.

SetMaximumPoolSize ( long value ) : long

Changes the allowable buffer size

ShrinkMemoryPool ( long size ) : long

Tries to shrink the buffer pool to the provided size

The buffer pool shrinks to a size less than or equal to size.

TryGetNextPage ( int &index, IntPtr &addressPointer ) : bool

Requests a new block from the buffer pool.

비공개 메소드들

메소드 설명
CalculateMemoryBlockSize ( int pageSize, long totalSystemMemory ) : int

Calculates the desired allocation block size to request from the OS.

The recommended block size is the totalSystemMemory divided by 1000 but must be a multiple of the system allocation size and the page size and cannot be larger than 1GB

CalculateMemoryPoolCeiling ( int memoryBlockSize, long systemTotalPhysicalMemory ) : long

Computes the ceiling of the buffer pool

메소드 상세

Dispose() 공개 메소드

Disposes of all of the memory on the list.
public Dispose ( ) : void
리턴 void

GrowMemoryPool() 공개 메소드

Grows the buffer pool to have the desired size
public GrowMemoryPool ( long size ) : bool
size long
리턴 bool

MemoryPoolPageList() 공개 메소드

Create a thread safe list of MemoryPool pages.
public MemoryPoolPageList ( int pageSize, long maximumBufferSize ) : System
pageSize int The desired page size. Must be between 4KB and 256KB
maximumBufferSize long The desired maximum size of the allocation. Note: could be less if there is not enough system memory. /// A value of -1 will default based on available system memory
리턴 System

ReleasePage() 공개 메소드

Releases a block back to the pool so it can be re-allocated.
public ReleasePage ( int index ) : void
index int the index identifier of the block
리턴 void

SetMaximumPoolSize() 공개 메소드

Changes the allowable buffer size
public SetMaximumPoolSize ( long value ) : long
value long the number of bytes to set.
리턴 long

ShrinkMemoryPool() 공개 메소드

Tries to shrink the buffer pool to the provided size
The buffer pool shrinks to a size less than or equal to size.
public ShrinkMemoryPool ( long size ) : long
size long The size of the buffer pool
리턴 long

TryGetNextPage() 공개 메소드

Requests a new block from the buffer pool.
Thrown if the list is full
public TryGetNextPage ( int &index, IntPtr &addressPointer ) : bool
index int the index identifier of the block
addressPointer System.IntPtr the address to the start of the block
리턴 bool

프로퍼티 상세

MemoryPoolCeiling 공개적으로 프로퍼티

The maximum supported number of bytes that can be allocated based on the amount of RAM in the system. This is not user configurable.
public long MemoryPoolCeiling
리턴 long

PageSize 공개적으로 프로퍼티

Each page will be exactly this size (Based on RAM)
public int PageSize
리턴 int