Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Exomia.Native.Allocator

Daniel Baetz edited this page Jun 22, 2019 · 18 revisions

ByteArrayAllocator

A byte array allocator. This class cannot be inherited.

public class Exomia.Native.Allocator.ByteArrayAllocator
    : IDisposable

Constructors

.ctor ByteArrayAllocator(Int32 size, Byte capacity = 64)

Summary:

Initializes a new instance of the Exomia.Native.Allocator.ByteArrayAllocator class.

Parameter:

  • size - size.
  • capacity - (Optional) capacity.


Methods

Byte* Allocate()

Summary:

Allocate a new byte array.


    void Dispose()
void Free(Byte* ptr)

Summary:

free a byte array.

Parameter:

  • ptr - [in,out] ptr.


ByteArrayPool2Allocator

A byte array pool 2 allocator. This class cannot be inherited.

public class Exomia.Native.Allocator.ByteArrayPool2Allocator
    : IDisposable

Constructors

.ctor ByteArrayPool2Allocator(Byte[] bucketCapacity, Int32 shift)

Summary:

Initializes a new instance of the Exomia.Native.Allocator.ByteArrayPool2Allocator class.

Parameter:

  • bucketCapacity - bucketCapacity.
  • shift - shift.


Methods

Byte* Allocate(Int32 size)

Summary:

Allocate a new byte array.

Parameter:

  • size - size to allocate.

    void Dispose()
void Free(Byte* ptr, Int32 size)

Summary:

free a byte array.

Parameter:

  • ptr - [in,out] ptr.
  • size - size of ptr.


ByteArrayPoolAllocator

A byte array pool allocator. This class cannot be inherited.

public class Exomia.Native.Allocator.ByteArrayPoolAllocator
    : IDisposable

Constructors

.ctor ByteArrayPoolAllocator(Byte[] bucketCapacity, Int32 shift)

Summary:

Initializes a new instance of the Exomia.Native.Allocator.ByteArrayPoolAllocator class.

Parameter:

  • bucketCapacity - bucketCapacity.
  • shift - shift.


Methods

Byte* Allocate(Int32 size)

Summary:

Allocate a new byte array.

Parameter:

  • size - size to allocate.

    void Dispose()
void Free(Byte* ptr, Int32 size)

Summary:

free a byte array.

Parameter:

  • ptr - [in,out] ptr.
  • size - size of ptr.