Kore 3
Loading...
Searching...
No Matches
includes
kore3
util
indexallocator.h
1
#ifndef KORE_INDEX_ALLOCATOR_HEADER
2
#define KORE_INDEX_ALLOCATOR_HEADER
3
4
#include <stdint.h>
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
#define KORE_INDEX_ALLOCATOR_SIZE 1024 * 10
11
12
typedef
struct
kore_index_allocator
{
13
uint32_t indices[KORE_INDEX_ALLOCATOR_SIZE];
14
uint32_t next_indices_index;
15
uint32_t remaining;
16
}
kore_index_allocator
;
17
18
void
kore_index_allocator_init(
kore_index_allocator
*allocator);
19
20
uint32_t kore_index_allocator_allocate(
kore_index_allocator
*allocator);
21
22
void
kore_index_allocator_free(
kore_index_allocator
*allocator, uint32_t index);
23
24
#ifdef __cplusplus
25
}
26
#endif
27
28
#endif
kore_index_allocator
Definition
indexallocator.h:12
Generated by
1.15.0