Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wmem_interval_tree.h
Go to the documentation of this file.
1
12#ifndef __WMEM_INTERVAL_TREE_H__
13#define __WMEM_INTERVAL_TREE_H__
14
15#include "wmem_core.h"
16#include "wmem_tree.h"
17#include "wmem_list.h"
18
19
20#ifdef __cplusplus
21extern "C" {
22#endif /* __cplusplus */
23
36struct _wmem_tree_t;
37
47
55 uint64_t low;
56 uint64_t high;
57 uint64_t max_edge;
58};
59
60
71WS_DLL_PUBLIC
74G_GNUC_MALLOC;
75
76
85WS_DLL_PUBLIC
86bool
88
89
102WS_DLL_PUBLIC
103void
104wmem_itree_insert(wmem_itree_t *tree, const uint64_t low, const uint64_t high, void *data);
105
106
120WS_DLL_PUBLIC
122wmem_itree_find_intervals(wmem_itree_t *tree, wmem_allocator_t *allocator, uint64_t low, uint64_t high);
123
124
134void
136
140#ifdef __cplusplus
141}
142#endif /* __cplusplus */
143
144#endif /* __WMEM_INTERVAL_TREE_H__ */
145
146/*
147 * Editor modelines - https://www.wireshark.org/tools/modelines.html
148 *
149 * Local variables:
150 * c-basic-offset: 4
151 * tab-width: 8
152 * indent-tabs-mode: nil
153 * End:
154 *
155 * vi: set shiftwidth=4 tabstop=8 expandtab:
156 * :indentSize=4:tabSize=8:noTabs=true:
157 */
WS_DLL_PUBLIC wmem_itree_t * wmem_itree_new(wmem_allocator_t *allocator) G_GNUC_MALLOC
Create a new interval tree using the specified memory allocator.
Definition wmem_interval_tree.c:91
WS_DLL_PUBLIC wmem_list_t * wmem_itree_find_intervals(wmem_itree_t *tree, wmem_allocator_t *allocator, uint64_t low, uint64_t high)
Find all intervals overlapping a given range in an interval tree.
Definition wmem_interval_tree.c:161
WS_DLL_PUBLIC bool wmem_itree_is_empty(wmem_itree_t *tree)
Check whether an interval tree is empty.
Definition wmem_interval_tree.c:99
void wmem_print_itree(wmem_itree_t *tree)
Print all intervals stored in the interval tree.
Definition wmem_interval_tree.c:173
WS_DLL_PUBLIC void wmem_itree_insert(wmem_itree_t *tree, const uint64_t low, const uint64_t high, void *data)
Insert an interval into the interval tree.
Definition wmem_interval_tree.c:120
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
Definition wmem_list.c:23
Represents a numeric range used in wmem's internal range tree.
Definition wmem_interval_tree.h:54
uint64_t low
Definition wmem_interval_tree.h:55
uint64_t high
Definition wmem_interval_tree.h:56
uint64_t max_edge
Definition wmem_interval_tree.h:57
Internal representation of a wmem balanced tree.
Definition wmem_tree-int.h:81