#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <glib.h>
#include <ws_symbol_export.h>
#include <ws_attributes.h>
#include <ws_posix_compat.h>
Go to the source code of this file.
|
#define | wmem_new(allocator, type) ((type*)wmem_alloc((allocator), sizeof(type))) |
|
#define | wmem_safe_mult_type_size(type, num) ((((num) <= 0) || ((size_t)sizeof(type) > (G_MAXSSIZE / (size_t)(num)))) ? 0 : (sizeof(type) * (num))) |
|
#define | wmem_alloc_array(allocator, type, num) ((type*)wmem_alloc((allocator), wmem_safe_mult_type_size(type, (num)))) |
|
#define | wmem_new0(allocator, type) ((type*)wmem_alloc0((allocator), sizeof(type))) |
|
#define | wmem_alloc0_array(allocator, type, num) ((type*)wmem_alloc0((allocator), wmem_safe_mult_type_size(type, (num)))) |
|
Definitions for the Wireshark Memory Manager Core Copyright 2012, Evan Huus eapac.nosp@m.he@g.nosp@m.mail..nosp@m.com
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