LMMS
Loading...
Searching...
No Matches
_LV2_RtMemPool_Pool Struct Reference

#include <lv2_rtmempool.h>

Public Attributes

bool(* create )(LV2_RtMemPool_Handle *handle_ptr, const char *pool_name, size_t data_size, size_t min_preallocated, size_t max_preallocated)
void(* destroy )(LV2_RtMemPool_Handle handle)
void *(* allocate_atomic )(LV2_RtMemPool_Handle handle)
void *(* allocate_sleepy )(LV2_RtMemPool_Handle handle)
void(* deallocate )(LV2_RtMemPool_Handle handle, void *memory_ptr)

Detailed Description

On instantiation, host must supply LV2_RTSAFE_MEMORY_POOL__Pool feature. LV2_Feature::data must be pointer to LV2_RtMemPool_Pool.

Member Data Documentation

◆ allocate_atomic

void *(* _LV2_RtMemPool_Pool::allocate_atomic) (LV2_RtMemPool_Handle handle)

This function is called when plugin wants to allocate memory in context where sleeping is not allowed

will not sleep

Returns
Pointer to allocated memory or NULL if memory no memory is available

◆ allocate_sleepy

void *(* _LV2_RtMemPool_Pool::allocate_sleepy) (LV2_RtMemPool_Handle handle)

This function is called when plugin wants to allocate memory in context where sleeping is allowed

may/will sleep

Returns
Pointer to allocated memory or NULL if memory no memory is available (should not happen under normal conditions)

◆ create

bool(* _LV2_RtMemPool_Pool::create) (LV2_RtMemPool_Handle *handle_ptr, const char *pool_name, size_t data_size, size_t min_preallocated, size_t max_preallocated)

This function is called when plugin wants to create memory pool

may/will sleep

Parameters
pool_namepool name, for debug purposes, max RTSAFE_MEMORY_POOL_NAME_MAX chars, including terminating zero char. May be NULL.
data_sizememory chunk size
min_preallocatedmin chunks preallocated
max_preallocatedmax chunks preallocated
Returns
Success status, true if successful

◆ deallocate

void(* _LV2_RtMemPool_Pool::deallocate) (LV2_RtMemPool_Handle handle, void *memory_ptr)

This function is called when plugin wants to deallocate previously allocated memory

will not sleep

Parameters
memory_ptrpointer to previously allocated memory chunk

◆ destroy

void(* _LV2_RtMemPool_Pool::destroy) (LV2_RtMemPool_Handle handle)

This function is called when plugin wants to destroy previously created memory pool

may/will sleep


The documentation for this struct was generated from the following file: