Search Results for

    Show / Hide Table of Contents

    Class CrtAllocator

    The default implementation of the memory allocator using traditional ANSI allocation API under the hood (malloc/free).

    Inheritance
    CrtAllocator
    Assembly: FlaxEngine.dll
    File: Engine/Core/Memory/CrtAllocator.h
    Syntax
    public class CrtAllocator

    Methods

    Allocate(uint64 size, uint64 alignment=16)

    Allocates memory on a specified alignment boundary.

    Declaration
    public static void* Allocate(uint64 size, uint64 alignment=16)
    Parameters
    uint64 size

    The size of the allocation (in bytes).

    uint64 alignment

    The memory alignment (in bytes). Must be an integer power of 2.

    Returns
    void

    The pointer to the allocated chunk of the memory. The pointer is a multiple of alignment.

    Free(void* ptr)

    Frees a block of allocated memory.

    Declaration
    public static void Free(void* ptr)
    Parameters
    void ptr

    A pointer to the memory block to deallocate.

    Returns
    void

    Name()

    Gets the name of the allocator.

    Declaration
    public static Char* Name()
    Returns
    Char

    The name.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat