Skip to main content

API

interactor_payload_pool

Used for allocation of fixed-sized structures.

Declaration
struct interactor_payload_pool
{
struct interactor_mempool pool;
size_t size;
};


int interactor_payload_pool_create(struct interactor_payload_pool* pool, struct interactor_memory* memory, size_t payload_size);

void interactor_payload_pool_destroy(struct interactor_payload_pool* pool);

intptr_t interactor_payload_pool_allocate(struct interactor_payload_pool* pool);

void interactor_payload_pool_free(struct interactor_payload_pool* pool, intptr_t payload);

interactor_data_pool

Used for allocation of dynamic-sized structures.

Declaration
struct interactor_data_pool
{
struct interactor_small pool;
};


int interactor_data_pool_create(struct interactor_data_pool* pool, struct interactor_memory* memory);

void interactor_data_pool_destroy(struct interactor_data_pool* pool);

intptr_t interactor_data_pool_allocate(struct interactor_data_pool* pool, size_t size);

void interactor_data_pool_free(struct interactor_data_pool* pool, intptr_t payload, size_t size);

interactor_buffers_pool

Used for sending and receiving fixed-sized buffers.

Declaration
struct interactor_buffers_pool
{
int32_t* ids;
size_t count;
size_t size;
};


int interactor_buffers_pool_create(struct interactor_buffers_pool* pool, size_t size);

void interactor_buffers_pool_destroy(struct interactor_buffers_pool* pool);

void interactor_buffers_pool_push(struct interactor_buffers_pool* pool, int32_t id);

int32_t interactor_buffers_pool_pop(struct interactor_buffers_pool* pool);