git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
acl: use setjmp/longjmp to handle alloc failures at build phase
[dpdk.git]
/
lib
/
librte_acl
/
tb_mem.h
diff --git
a/lib/librte_acl/tb_mem.h
b/lib/librte_acl/tb_mem.h
index
a8dae94
..
ca7af96
100644
(file)
--- a/
lib/librte_acl/tb_mem.h
+++ b/
lib/librte_acl/tb_mem.h
@@
-48,6
+48,7
@@
extern "C" {
#endif
#include <rte_acl_osdep.h>
#endif
#include <rte_acl_osdep.h>
+#include <setjmp.h>
struct tb_mem_block {
struct tb_mem_block *next;
struct tb_mem_block {
struct tb_mem_block *next;
@@
-61,6
+62,8
@@
struct tb_mem_pool {
size_t alignment;
size_t min_alloc;
size_t alloc;
size_t alignment;
size_t min_alloc;
size_t alloc;
+ /* jump target in case of memory allocation failure. */
+ sigjmp_buf fail;
};
void *tb_alloc(struct tb_mem_pool *pool, size_t size);
};
void *tb_alloc(struct tb_mem_pool *pool, size_t size);