| Wireshark 4.7.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
20 extern "C" {
21#endif /* __cplusplus */
22
23 struct _wmem_user_cb_container_t;
24
34 struct _wmem_allocator_t {
35 /* Consumer functions */
36 void *(*walloc)(void *private_data, const size_t size);
37 void (*wfree)(void *private_data, void *ptr);
38 void *(*wrealloc)(void *private_data, void *ptr, const size_t size);
40 /* Producer/Manager functions */
41 void (*free_all)(void *private_data);
42 void (*gc)(void *private_data);
43 void (*cleanup)(void *private_data);
45 /* Callback List */
46 struct _wmem_user_cb_container_t *callbacks;
48 /* Implementation details */
49 void *private_data;
50 enum _wmem_allocator_type_t type;
51 bool in_scope;
52};
53
54#ifdef __cplusplus
55}
56#endif /* __cplusplus */
57
58#endif /* __WMEM_ALLOCATOR_H__ */
59
60/*
61 * Editor modelines - https://www.wireshark.org/tools/modelines.html
62 *
63 * Local variables:
64 * c-basic-offset: 4
65 * tab-width: 8
66 * indent-tabs-mode: nil
67 * End:
68 *
69 * vi: set shiftwidth=4 tabstop=8 expandtab:
70 * :indentSize=4:tabSize=8:noTabs=true:
71 */
_wmem_allocator_type_t
_wmem_allocator_type_t
Definition wmem_core.h:47
_wmem_allocator_t
Internal memory allocator interface used by the wmem subsystem.
Definition wmem_allocator.h:34
_wmem_allocator_t::type
enum _wmem_allocator_type_t type
Definition wmem_allocator.h:50
_wmem_allocator_t::wfree
void(* wfree)(void *private_data, void *ptr)
Definition wmem_allocator.h:37
_wmem_allocator_t::callbacks
struct _wmem_user_cb_container_t * callbacks
Definition wmem_allocator.h:46
_wmem_allocator_t::cleanup
void(* cleanup)(void *private_data)
Definition wmem_allocator.h:43
_wmem_allocator_t::gc
void(* gc)(void *private_data)
Definition wmem_allocator.h:42
_wmem_allocator_t::in_scope
bool in_scope
Definition wmem_allocator.h:51
_wmem_allocator_t::free_all
void(* free_all)(void *private_data)
Definition wmem_allocator.h:41
_wmem_allocator_t::private_data
void * private_data
Definition wmem_allocator.h:49
_wmem_user_cb_container_t
Definition wmem_user_cb.c:18