Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
app_mem_usage.h
Go to the documentation of this file.
1
9#ifndef __APP_MEM_USAGE_H__
10#define __APP_MEM_USAGE_H__
11
12#include "ws_symbol_export.h"
13
17typedef struct {
18 const char *name;
19 size_t (*fetch)(void);
20 void (*gc)(void);
22
28WS_DLL_PUBLIC void memory_usage_component_register(const ws_mem_usage_t *component);
29
36WS_DLL_PUBLIC void memory_usage_gc(void);
37
45WS_DLL_PUBLIC const char *memory_usage_get(unsigned idx, size_t *value);
46
47#endif /* APP_MEM_USAGE_H */
WS_DLL_PUBLIC const char * memory_usage_get(unsigned idx, size_t *value)
Retrieves the name of a memory usage component.
Definition app_mem_usage.c:177
WS_DLL_PUBLIC void memory_usage_gc(void)
Perform garbage collection on memory components.
Definition app_mem_usage.c:189
WS_DLL_PUBLIC void memory_usage_component_register(const ws_mem_usage_t *component)
Registers a memory usage component.
Definition app_mem_usage.c:168
Describes a named memory usage tracker, providing callbacks to query current consumption and release ...
Definition app_mem_usage.h:17
void(* gc)(void)
Definition app_mem_usage.h:20
size_t(* fetch)(void)
Definition app_mem_usage.h:19
const char * name
Definition app_mem_usage.h:18