Blog
Community
Development
Documentation
CNDP
22.08.0
Main Page
Related Pages
Data Structures
Data Structures
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
x
Functions
_
c
d
e
f
g
h
i
j
k
l
m
n
p
s
t
u
v
x
Variables
Typedefs
a
b
c
h
i
j
l
m
o
p
s
t
u
v
Enumerations
Enumerator
_
a
c
d
e
j
m
p
r
s
t
u
Macros
_
a
c
d
e
h
i
j
k
l
m
o
p
r
t
u
v
x
Examples
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
tb_mem.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright (c) 2010-2022 Intel Corporation
3
*/
4
5
#ifndef _TB_MEM_H_
6
#define _TB_MEM_H_
7
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
21
#include <
cne_acl_osdep.h
>
22
#include <setjmp.h>
// for sigjmp_buf
23
#include <stddef.h>
// for size_t
24
#include <stdint.h>
// for uint8_t
25
26
struct
tb_mem_block {
27
struct
tb_mem_block *next;
28
struct
tb_mem_pool *pool;
29
size_t
size;
30
uint8_t *mem;
31
};
32
33
struct
tb_mem_pool {
34
struct
tb_mem_block *block;
35
size_t
alignment;
36
size_t
min_alloc;
37
size_t
alloc;
38
/* jump target in case of memory allocation failure. */
39
sigjmp_buf fail;
40
};
41
42
void
*tb_alloc(
struct
tb_mem_pool *pool,
size_t
size);
43
void
tb_free_pool(
struct
tb_mem_pool *pool);
44
45
#ifdef __cplusplus
46
}
47
#endif
48
49
#endif
/* _TB_MEM_H_ */
cne_acl_osdep.h
lib
usr
clib
acl
tb_mem.h
Generated by
1.9.1