|
Blender V4.3
|
#include <cstdlib>Go to the source code of this file.
Macros | |
| #define | __has_feature(x) 0 |
| #define | ASAN_POISON_MEMORY_REGION(addr, size) (void)(0 && ((size) != 0 && (addr) != NULL)) |
| #define | ASAN_UNPOISON_MEMORY_REGION(addr, size) (void)(0 && ((size) != 0 && (addr) != NULL)) |
Functions | |
| MEM_INLINE bool | MEM_size_safe_multiply (size_t a, size_t b, size_t *result) |
| MEM_INLINE void | MEM_trigger_error_on_memory_block (const void *, const size_t) |
| #define __has_feature | ( | x | ) | 0 |
Definition at line 18 of file mallocn_inline.hh.
Definition at line 27 of file mallocn_inline.hh.
Definition at line 28 of file mallocn_inline.hh.
| MEM_INLINE bool MEM_size_safe_multiply | ( | size_t | a, |
| size_t | b, | ||
| size_t * | result ) |
Definition at line 33 of file mallocn_inline.hh.
References b, SIZE_MAX, and UNLIKELY.
Referenced by MEM_guarded_calloc_arrayN(), MEM_guarded_calloc_arrayN_aligned(), MEM_guarded_malloc_arrayN(), MEM_lockfree_calloc_arrayN(), MEM_lockfree_calloc_arrayN_aligned(), and MEM_lockfree_malloc_arrayN().
| MEM_INLINE void MEM_trigger_error_on_memory_block | ( | const void * | , |
| const size_t | ) |
Util to trigger an error for the given memory block.
When ASAN is available, it will poison the memory block before accessing it, to trigger a detailed ASAN report. Otherwise, it will abort if aborting on assert is set.
Definition at line 82 of file mallocn_inline.hh.
Referenced by report_error_on_address(), and report_error_on_address().