| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Functions
app_mem_usage.h File Reference
`#include "ws_symbol_export.h"`

Go to the source code of this file.

## Classes
struct | ws_mem_usage_t

## Functions
WS_DLL_PUBLIC void | memory_usage_component_register (const ws_mem_usage_t *component)
| Registers a memory usage component.
WS_DLL_PUBLIC void | memory_usage_gc (void)
| Perform garbage collection on memory components.
WS_DLL_PUBLIC const char * | memory_usage_get (unsigned idx, size_t *value)
| Retrieves the name of a memory usage component.

## Detailed Description

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

## Function Documentation

## ◆ memory_usage_component_register()

WS_DLL_PUBLIC void memory_usage_component_register | ( | const ws_mem_usage_t * | component | ) |

Registers a memory usage component.

Parameters

  component | Pointer to the memory usage component to register.

## ◆ memory_usage_gc()

WS_DLL_PUBLIC void memory_usage_gc | ( | void |  | ) |

Perform garbage collection on memory components.

This function iterates through all registered memory components and calls their garbage collection functions if available.

## ◆ memory_usage_get()

WS_DLL_PUBLIC const char * memory_usage_get | ( | unsigned | idx,
|  | size_t * | value
| ) |  |

Retrieves the name of a memory usage component.

Parameters

  idx | Index of the memory usage component to retrieve.
  value | Pointer to store the fetched value if not NULL.

Returns
  const char* Name of the memory usage component, or NULL if invalid index.