Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
wmem_allocator.h
Go to the documentation of this file.
1
13#ifndef __WMEM_ALLOCATOR_H__
14#define __WMEM_ALLOCATOR_H__
15
16#include <glib.h>
17#include <string.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif /* __cplusplus */
22
24
25/* See section "4. Internal Design" of doc/README.wmem for details
26 * on this structure */
28 /* Consumer functions */
29 void *(*walloc)(void *private_data, const size_t size);
30 void (*wfree)(void *private_data, void *ptr);
31 void *(*wrealloc)(void *private_data, void *ptr, const size_t size);
32
33 /* Producer/Manager functions */
34 void (*free_all)(void *private_data);
35 void (*gc)(void *private_data);
36 void (*cleanup)(void *private_data);
37
38 /* Callback List */
39 struct _wmem_user_cb_container_t *callbacks;
40
41 /* Implementation details */
42 void *private_data;
43 enum _wmem_allocator_type_t type;
44 bool in_scope;
45};
46
47#ifdef __cplusplus
48}
49#endif /* __cplusplus */
50
51#endif /* __WMEM_ALLOCATOR_H__ */
52
53/*
54 * Editor modelines - https://www.wireshark.org/tools/modelines.html
55 *
56 * Local variables:
57 * c-basic-offset: 4
58 * tab-width: 8
59 * indent-tabs-mode: nil
60 * End:
61 *
62 * vi: set shiftwidth=4 tabstop=8 expandtab:
63 * :indentSize=4:tabSize=8:noTabs=true:
64 */
_wmem_allocator_type_t
Definition wmem_core.h:47
Definition wmem_allocator.h:27
Definition wmem_user_cb.c:18