Struct VMRange
A range of virtual memory with a pointer to the beginning of a range of bytes, log2 of the page size in bytes, and number of pages in this allocation.
Namespace: Unity.Collections.LowLevel.Unsafe
Syntax
public struct VMRange
Constructors
VMRange(IntPtr, Byte, UInt32)
Declaration
public VMRange(IntPtr rangePtr, byte rangeLog2PageSize, uint rangePageCount)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | rangePtr | |
Byte | rangeLog2PageSize | |
UInt32 | rangePageCount |
VMRange(IntPtr, UInt32, UInt32)
Constructs a VMRange from a pointer, range size in bytes, and page size in bytes.
Declaration
public VMRange(IntPtr rangePtr, uint rangeBytes, uint pageSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | rangePtr | Pointer to beginning of address range. |
UInt32 | rangeBytes | Size of address range in bytes. |
UInt32 | pageSizeInBytes | Size of pages in bytes. |
Fields
log2PageSize
2 ^ log2PageSize = virtual memory page size in bytes
Declaration
public byte log2PageSize
Field Value
Type | Description |
---|---|
Byte |
pageCount
Number of pages in this address range.
Declaration
public uint pageCount
Field Value
Type | Description |
---|---|
UInt32 |
ptr
Pointer to the beginning of an address range.
Declaration
public IntPtr ptr
Field Value
Type | Description |
---|---|
IntPtr |
Properties
PageSizeInBytes
Virtual memory page size in bytes for this address range.
Declaration
public uint PageSizeInBytes { get; set; }
Property Value
Type | Description |
---|---|
UInt32 |
SizeInBytes
Number of bytes contained in this range.
Declaration
public ulong SizeInBytes { get; }
Property Value
Type | Description |
---|---|
UInt64 |