A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arrayfire.org/docs/group__memory__manager.htm below:

ArrayFire: Memory Management

Interfaces for writing custom memory managers. More...

Interfaces for writing custom memory managers.

Create and set a custom memory manager by first defining the relevant closures for each required function, for example:

void* myPayload = malloc(sizeof(MyPayload_t));

}

void* myPayload;

}

AFAPI af_err af_memory_manager_get_payload(af_memory_manager handle, void **payload)

Gets the payload ptr from an af_memory_manager.

AFAPI af_err af_memory_manager_set_payload(af_memory_manager handle, void *payload)

Sets the payload ptr from an af_memory_manager.

Create an af_memory_manager and attach relevant closures:

AFAPI af_err af_memory_manager_set_initialize_fn(af_memory_manager handle, af_memory_manager_initialize_fn fn)

Sets an af_memory_manager_initialize_fn for a memory manager.

AFAPI af_err af_create_memory_manager(af_memory_manager *out)

Creates an af_memory_manager handle.

AFAPI af_err af_memory_manager_set_allocated_fn(af_memory_manager handle, af_memory_manager_allocated_fn fn)

Sets an af_memory_manager_allocated_fn for a memory manager.

Set the memory manager to be active, which shuts down the existing memory manager:

AFAPI af_err af_set_memory_manager(af_memory_manager handle)

Sets an af_memory_manager to be the default memory manager for non-pinned memory allocations in Array...

Unset to re-create and reset an instance of the default memory manager:

AFAPI af_err af_unset_memory_manager()

Reset the memory manager being used in ArrayFire to the default memory manager, shutting down the exi...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4