NativeMemoryPool 结构
Native memory pool
命名空间: NativeCollections
程序集: Fantasy.Net.dll
语法
[StructLayout(LayoutKind.Sequential)]
public readonly struct NativeMemoryPool : IDisposable, IEquatable<NativeMemoryPool>
构造函数
| 编辑本文 查看源代码NativeMemoryPool(int, int, int)
Structure
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public NativeMemoryPool(int size, int length, int maxFreeSlabs)
参数
类型 | 名称 | 描述 |
---|---|---|
int | size | Size |
int | length | Length |
int | maxFreeSlabs | Max free slabs |
属性
| 编辑本文 查看源代码Empty
Empty
声明
public static NativeMemoryPool Empty { get; }
属性值
类型 | 描述 |
---|---|
NativeMemoryPool |
FreeSlabs
Free slabs
声明
public int FreeSlabs { get; }
属性值
类型 | 描述 |
---|---|
int |
IsCreated
Is created
声明
public bool IsCreated { get; }
属性值
类型 | 描述 |
---|---|
bool |
Length
Length
声明
public int Length { get; }
属性值
类型 | 描述 |
---|---|
int |
MaxFreeSlabs
Max free slabs
声明
public int MaxFreeSlabs { get; }
属性值
类型 | 描述 |
---|---|
int |
Size
Size
声明
public int Size { get; }
属性值
类型 | 描述 |
---|---|
int |
Slabs
Slabs
声明
public int Slabs { get; }
属性值
类型 | 描述 |
---|---|
int |
方法
| 编辑本文 查看源代码Dispose()
Dispose
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Dispose()
Equals(NativeMemoryPool)
Equals
声明
public bool Equals(NativeMemoryPool other)
参数
类型 | 名称 | 描述 |
---|---|---|
NativeMemoryPool | other | Other |
返回
类型 | 描述 |
---|---|
bool | Equals |
Equals(object?)
Equals
声明
public override bool Equals(object? obj)
参数
类型 | 名称 | 描述 |
---|---|---|
object | obj | object |
返回
类型 | 描述 |
---|---|
bool | Equals |
重写
| 编辑本文 查看源代码GetHashCode()
Get hashCode
声明
public override int GetHashCode()
返回
类型 | 描述 |
---|---|
int | HashCode |
重写
| 编辑本文 查看源代码Rent()
Rent buffer
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void* Rent()
返回
类型 | 描述 |
---|---|
void* | Buffer |
Return(void*)
Return buffer
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Return(void* ptr)
参数
类型 | 名称 | 描述 |
---|---|---|
void* | ptr | Pointer |
ToString()
To string
声明
public override string ToString()
返回
类型 | 描述 |
---|---|
string | String |
重写
| 编辑本文 查看源代码TrimExcess()
Trim excess
声明
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TrimExcess()
运算符
| 编辑本文 查看源代码operator ==(NativeMemoryPool, NativeMemoryPool)
Equals
声明
public static bool operator ==(NativeMemoryPool left, NativeMemoryPool right)
参数
类型 | 名称 | 描述 |
---|---|---|
NativeMemoryPool | left | Left |
NativeMemoryPool | right | Right |
返回
类型 | 描述 |
---|---|
bool | Equals |
operator !=(NativeMemoryPool, NativeMemoryPool)
Not equals
声明
public static bool operator !=(NativeMemoryPool left, NativeMemoryPool right)
参数
类型 | 名称 | 描述 |
---|---|---|
NativeMemoryPool | left | Left |
NativeMemoryPool | right | Right |
返回
类型 | 描述 |
---|---|
bool | Not equals |