2021-11-26 03:31:05 +00:00
|
|
|
/** @file
|
2012-11-03 15:49:15 +00:00
|
|
|
* Definitions for the Wireshark Memory Manager Scopes
|
|
|
|
* Copyright 2012, Evan Huus <eapache@gmail.com>
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-08 16:31:35 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2012-11-03 15:49:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WMEM_SCOPES_H__
|
|
|
|
#define __WMEM_SCOPES_H__
|
|
|
|
|
2021-07-12 20:22:05 +00:00
|
|
|
#include <wsutil/wmem/wmem.h>
|
2012-11-03 15:49:15 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
/* Epan Scope */
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-11-03 15:49:15 +00:00
|
|
|
wmem_allocator_t *
|
|
|
|
wmem_epan_scope(void);
|
|
|
|
|
|
|
|
/* Packet Scope */
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-11-03 15:49:15 +00:00
|
|
|
wmem_allocator_t *
|
|
|
|
wmem_packet_scope(void);
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_LOCAL
|
2012-11-03 15:49:15 +00:00
|
|
|
void
|
|
|
|
wmem_enter_packet_scope(void);
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_LOCAL
|
2012-11-03 15:49:15 +00:00
|
|
|
void
|
|
|
|
wmem_leave_packet_scope(void);
|
|
|
|
|
|
|
|
/* File Scope */
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-11-03 15:49:15 +00:00
|
|
|
wmem_allocator_t *
|
|
|
|
wmem_file_scope(void);
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_LOCAL
|
2012-11-03 15:49:15 +00:00
|
|
|
void
|
|
|
|
wmem_enter_file_scope(void);
|
|
|
|
|
2013-03-09 20:25:44 +00:00
|
|
|
WS_DLL_LOCAL
|
2012-11-03 15:49:15 +00:00
|
|
|
void
|
|
|
|
wmem_leave_file_scope(void);
|
|
|
|
|
|
|
|
/* Scope Management */
|
|
|
|
|
2021-07-12 20:22:05 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-11-03 15:49:15 +00:00
|
|
|
void
|
|
|
|
wmem_init_scopes(void);
|
|
|
|
|
2021-07-12 20:22:05 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-11-03 15:49:15 +00:00
|
|
|
void
|
|
|
|
wmem_cleanup_scopes(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __WMEM_SCOPES_H__ */
|
|
|
|
|
|
|
|
/*
|
2019-07-26 18:43:17 +00:00
|
|
|
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2012-11-03 15:49:15 +00:00
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|