| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Functions
wmem_allocator_block_fast.h File Reference
`#include "wmem_core.h"`

Go to the source code of this file.

## Functions
void | wmem_block_fast_allocator_init (wmem_allocator_t *allocator)
| Initialize a fast block-based memory allocator.

## Detailed Description

Definitions for the Wireshark Memory Manager Fast Large-Block Allocator

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

## ◆ wmem_block_fast_allocator_init()

void wmem_block_fast_allocator_init | ( | wmem_allocator_t * | allocator | ) |

Initialize a fast block-based memory allocator.

Sets up a `wmem_allocator_t` to use a fast block-based memory management strategy. This variant is optimized for performance and may use different allocation heuristics compared to the standard block allocator. It assigns function pointers for allocation, reallocation, freeing, and cleanup operations, and initializes internal block tracking structures.

Parameters

  allocator | Pointer to the allocator structure to initialize.

Note
  After initialization, the allocator can be used for fast block-based memory operations. The allocator must not be NULL.