| 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
17 typedef struct {
18 const char *name;
19 size_t (*fetch)(void);
20 void (*gc)(void);
21} ws_mem_usage_t;
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 */
memory_usage_get
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
memory_usage_gc
WS_DLL_PUBLIC void memory_usage_gc(void)
Perform garbage collection on memory components.
Definition app_mem_usage.c:189
memory_usage_component_register
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
ws_mem_usage_t
Describes a named memory usage tracker, providing callbacks to query current consumption and release ...
Definition app_mem_usage.h:17
ws_mem_usage_t::gc
void(* gc)(void)
Definition app_mem_usage.h:20
ws_mem_usage_t::fetch
size_t(* fetch)(void)
Definition app_mem_usage.h:19
ws_mem_usage_t::name
const char * name
Definition app_mem_usage.h:18