Blender V5.0
mallocn_inline.hh File Reference
#include <cstdlib>

Go to the source code of this file.

Macros

#define __has_feature(x)
#define ASAN_POISON_MEMORY_REGION(addr, size)
#define ASAN_UNPOISON_MEMORY_REGION(addr, size)

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)

Macro Definition Documentation

◆ __has_feature

#define __has_feature ( x)
Value:
0

Definition at line 18 of file mallocn_inline.hh.

◆ ASAN_POISON_MEMORY_REGION

#define ASAN_POISON_MEMORY_REGION ( addr,
size )
Value:
(void)(0 && ((size) != 0 && (addr) != NULL))
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52

Definition at line 27 of file mallocn_inline.hh.

◆ ASAN_UNPOISON_MEMORY_REGION

#define ASAN_UNPOISON_MEMORY_REGION ( addr,
size )
Value:
(void)(0 && ((size) != 0 && (addr) != NULL))

Definition at line 28 of file mallocn_inline.hh.

Function Documentation

◆ MEM_size_safe_multiply()

◆ MEM_trigger_error_on_memory_block()

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.

References MEM_INLINE.

Referenced by report_error_on_address(), and report_error_on_address().