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

This class is used to allocate and free unmanaged memory. To release memory allocated throught this class, call the Dispose method of the return value.
.NET does not respond well when managing tens of GBs of ram. If a very large buffer pool must be created, it would be good to allocate that buffer pool in unmanaged memory.
상속: IDisposable
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian

공개 메소드들

메소드 설명
Clear ( IntPtr pointer, int length ) : void

Sets the data in this buffer to all zeroes

Clear ( byte pointer, int length ) : void

Sets the data in this buffer to all zeroes

Copy ( IntPtr src, IntPtr dest, int count ) : void

Does a safe copy of data from one location to another. A safe copy allows for the source and destination to overlap.

Copy ( byte src, byte dest, int count ) : void

Does a safe copy of data from one location to another. A safe copy allows for the source and destination to overlap.

Dispose ( ) : void

Releases all the resources used by the Memory object.

Memory ( int requestedSize ) : System

Allocates unmanaged memory. The block is uninitialized.

Release ( ) : void

Releases the allocated memory back to the OS. Same thing as calling Dispose().

메소드 상세

Clear() 공개 정적인 메소드

Sets the data in this buffer to all zeroes
public static Clear ( IntPtr pointer, int length ) : void
pointer System.IntPtr the starting position.
length int the number of bytes to clear.
리턴 void

Clear() 공개 정적인 메소드

Sets the data in this buffer to all zeroes
public static Clear ( byte pointer, int length ) : void
pointer byte the starting position.
length int the number of bytes to clear.
리턴 void

Copy() 공개 정적인 메소드

Does a safe copy of data from one location to another. A safe copy allows for the source and destination to overlap.
public static Copy ( IntPtr src, IntPtr dest, int count ) : void
src System.IntPtr
dest System.IntPtr
count int
리턴 void

Copy() 공개 정적인 메소드

Does a safe copy of data from one location to another. A safe copy allows for the source and destination to overlap.
public static Copy ( byte src, byte dest, int count ) : void
src byte
dest byte
count int
리턴 void

Dispose() 공개 메소드

Releases all the resources used by the Memory object.
public Dispose ( ) : void
리턴 void

Memory() 공개 메소드

Allocates unmanaged memory. The block is uninitialized.
public Memory ( int requestedSize ) : System
requestedSize int The desired number of bytes to allocate. /// Be sure to check the actual size in the return class.
리턴 System

Release() 공개 메소드

Releases the allocated memory back to the OS. Same thing as calling Dispose().
public Release ( ) : void
리턴 void