wmem: allow wmem_destroy_list to ignore a NULL list.
[wireshark-sm.git] / epan / app_mem_usage.h
blob6160128cb180c20dba6079558f552d1ae64a3bcb
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 #ifndef __APP_MEM_USAGE_H__
10 #define __APP_MEM_USAGE_H__
12 #include "ws_symbol_export.h"
14 typedef struct {
15 const char *name;
16 size_t (*fetch)(void);
17 void (*gc)(void);
19 } ws_mem_usage_t;
21 WS_DLL_PUBLIC void memory_usage_component_register(const ws_mem_usage_t *component);
23 WS_DLL_PUBLIC void memory_usage_gc(void);
25 WS_DLL_PUBLIC const char *memory_usage_get(unsigned idx, size_t *value);
27 #endif /* APP_MEM_USAGE_H */