Blender V5.3
mallocn_intern_function_pointers.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <cstddef>
12
14
21
23extern void (*mem_freeN_ex)(void *vmemh, DestructorType destructor_type);
24
29extern void *(*mem_callocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
31
36extern void *(*mem_calloc_arrayN)(size_t len,
37 size_t size,
38 const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
40
45extern void *(*mem_mallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
47
53extern void *(*mem_malloc_arrayN)(size_t len,
54 size_t size,
55 const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
57
61extern void *(*mem_mallocN_aligned_ex)(size_t len,
62 size_t alignment,
63 const char *str,
64 DestructorType destructor_type);
65
70extern void *(*mem_dupallocN)(const void *vmemh) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
71
86void add_memleak_data(std::any data);
87
88} // namespace mem_guarded::internal
#define ATTR_ALLOC_SIZE(...)
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
#define str(s)
bool any(VecOp< bool, D >) RET
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263
void *(*) mem_mallocN_aligned_ex(size_t len, size_t alignment, const char *str, DestructorType destructor_type)
Definition mallocn.cc:45
void(*) mem_freeN_ex(void *vmemh, DestructorType destructor_type)
Definition mallocn.cc:28
void *(*) mem_mallocN(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
Definition mallocn.cc:41
void *(*) mem_dupallocN(const void *vmemh) ATTR_WARN_UNUSED_RESULT
Definition mallocn.cc:30
void *(*) mem_malloc_arrayN(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
Definition mallocn.cc:42
void add_memleak_data(std::any data)
void *(*) mem_calloc_arrayN(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
Definition mallocn.cc:38