Modbus Vault v1.0
Loading...
Searching...
No Matches
slab_pool.h
Go to the documentation of this file.
1
12#ifndef SLAB_POOL_H
13#define SLAB_POOL_H
14
15#include "freertos/FreeRTOS.h"
16#include "freertos/semphr.h"
17
18#include <stdbool.h>
19#include <stddef.h>
20#include <stdint.h>
21
23#define SLAB_POOL_SIZE (32U)
25#define SLAB_POOL_MAX_DATA_SIZE (512U)
26
30typedef struct {
32 uint16_t length;
34
43esp_err_t slab_pool_init (void);
44
51
57void slab_pool_free (slab_pool_t *slab_ptr);
58
62void slab_pool_deinit (void);
63
64#endif
esp_err_t slab_pool_init(void)
Initialize slab pool.
Definition slab_pool.c:56
#define SLAB_POOL_MAX_DATA_SIZE
Definition slab_pool.h:25
void slab_pool_free(slab_pool_t *slab_ptr)
Return slab to pool.
Definition slab_pool.c:121
slab_pool_t * slab_pool_alloc(void)
Allocate a slab from pool.
Definition slab_pool.c:95
void slab_pool_deinit(void)
Deinitialize slab pool.
Definition slab_pool.c:138
Slab pool type structure.
Definition slab_pool.h:30
uint16_t length
Definition slab_pool.h:32