LMMS
Loading...
Searching...
No Matches
rtmempool.h
Go to the documentation of this file.
1/*
2 * RealTime Memory Pool, heavily based on work by Nedko Arnaudov
3 * Copyright (C) 2006-2009 Nedko Arnaudov <nedko@arnaudov.name>
4 * Copyright (C) 2013-2016 Filipe Coelho <falktx@falktx.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * For a full copy of the GNU General Public License see the GPL.txt file
17 */
18
19#ifndef __RTMEMPOOL_H__
20#define __RTMEMPOOL_H__
21
22#ifdef __cplusplus
23# include <cstddef>
24#else
25# include <stdbool.h>
26# include <stddef.h>
27#endif
28
30#define RTSAFE_MEMORY_POOL_NAME_MAX 128
31
35typedef void* RtMemPool_Handle;
36
50 const char* poolName,
51 size_t dataSize,
52 size_t minPreallocated,
53 size_t maxPreallocated);
54
61
70
79
88 void* memoryPtr);
89
90#endif // __RTMEMPOOL_H__
#define handlePtr
Definition Carla.cpp:78
void * rtsafe_memory_pool_allocate_atomic(RtMemPool_Handle handle)
Definition rtmempool.c:237
bool rtsafe_memory_pool_create(RtMemPool_Handle *handlePtr, const char *poolName, size_t dataSize, size_t minPreallocated, size_t maxPreallocated)
Definition rtmempool.c:191
void * rtsafe_memory_pool_allocate_sleepy(RtMemPool_Handle handle)
Definition rtmempool.c:267
void rtsafe_memory_pool_destroy(RtMemPool_Handle handle)
Definition rtmempool.c:202
void * RtMemPool_Handle
Definition rtmempool.h:35
void rtsafe_memory_pool_deallocate(RtMemPool_Handle handle, void *memoryPtr)
Definition rtmempool.c:287