1 /* wmem_scopes.h 2 * Definitions for the Wireshark Memory Manager Scopes 3 * Copyright 2012, Evan Huus <eapache@gmail.com> 4 * 5 * Wireshark - Network traffic analyzer 6 * By Gerald Combs <gerald@wireshark.org> 7 * Copyright 1998 Gerald Combs operatorC8 * 9 * SPDX-License-Identifier: GPL-2.0-or-later 10 */ 11 12 #ifndef __WMEM_SCOPES_H__ 13 #define __WMEM_SCOPES_H__ 14 15 #include <wsutil/wmem/wmem.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif /* __cplusplus */ 20 21 /* Epan Scope */ 22 23 WS_DLL_PUBLIC 24 wmem_allocator_t * 25 wmem_epan_scope(void); 26 27 /* Packet Scope */ 28 29 WS_DLL_PUBLIC 30 wmem_allocator_t * 31 wmem_packet_scope(void); 32 33 WS_DLL_LOCAL 34 void 35 wmem_enter_packet_scope(void); 36 37 WS_DLL_LOCAL 38 void 39 wmem_leave_packet_scope(void); 40 41 /* File Scope */ 42 43 WS_DLL_PUBLIC 44 wmem_allocator_t * 45 wmem_file_scope(void); 46 47 WS_DLL_LOCAL 48 void 49 wmem_enter_file_scope(void); 50 51 WS_DLL_LOCAL 52 void 53 wmem_leave_file_scope(void); 54 55 /* Scope Management */ 56 57 WS_DLL_PUBLIC 58 void 59 wmem_init_scopes(void); 60 61 WS_DLL_PUBLIC 62 void 63 wmem_cleanup_scopes(void); 64 65 #ifdef __cplusplus 66 } 67 #endif /* __cplusplus */ 68 69 #endif /* __WMEM_SCOPES_H__ */ 70 71 /* 72 * Editor modelines - https://www.wireshark.org/tools/modelines.html 73 * 74 * Local variables: 75 * c-basic-offset: 4 76 * tab-width: 8 77 * indent-tabs-mode: nil 78 * End: 79 * 80 * vi: set shiftwidth=4 tabstop=8 expandtab: 81 * :indentSize=4:tabSize=8:noTabs=true: 82 */ 83