Blender  V3.3
Classes | Public Member Functions | List of all members
blender::RawAllocator Class Reference

#include <BLI_allocator.hh>

Public Member Functions

voidallocate (size_t size, size_t alignment, const char *UNUSED(name))
 
void deallocate (void *ptr)
 

Detailed Description

This is a wrapper around malloc/free. Only use this when the GuardedAllocator cannot be used. This can be the case when the allocated memory might live longer than Blender's allocator. For example, when the memory is owned by a static variable.

Definition at line 59 of file BLI_allocator.hh.

Member Function Documentation

◆ allocate()

void* blender::RawAllocator::allocate ( size_t  size,
size_t  alignment,
const char *  UNUSEDname 
)
inline

Definition at line 66 of file BLI_allocator.hh.

References BLI_assert, is_power_of_2_i(), offset, POINTER_OFFSET, ptr, and size().

◆ deallocate()

void blender::RawAllocator::deallocate ( void ptr)
inline

Definition at line 79 of file BLI_allocator.hh.

References free(), offset, POINTER_OFFSET, and ptr.


The documentation for this class was generated from the following file: