Blender V5.0
btStackAlloc Class Reference

The StackAlloc class provides some fast stack-based memory allocator (LIFO last-in first-out). More...

#include <btStackAlloc.h>

Public Member Functions

 btStackAlloc (unsigned int size)
 ~btStackAlloc ()
void create (unsigned int size)
void destroy ()
int getAvailableMemory () const
unsigned char * allocate (unsigned int size)
SIMD_FORCE_INLINE btBlockbeginBlock ()
SIMD_FORCE_INLINE void endBlock (btBlock *block)

Detailed Description

The StackAlloc class provides some fast stack-based memory allocator (LIFO last-in first-out).

Definition at line 34 of file btStackAlloc.h.

Constructor & Destructor Documentation

◆ btStackAlloc()

btStackAlloc::btStackAlloc ( unsigned int size)
inline

Definition at line 37 of file btStackAlloc.h.

References create(), and size().

◆ ~btStackAlloc()

btStackAlloc::~btStackAlloc ( )
inline

Definition at line 42 of file btStackAlloc.h.

References destroy().

Member Function Documentation

◆ allocate()

unsigned char * btStackAlloc::allocate ( unsigned int size)
inline

Definition at line 70 of file btStackAlloc.h.

References btAssert, and size().

Referenced by beginBlock().

◆ beginBlock()

SIMD_FORCE_INLINE btBlock * btStackAlloc::beginBlock ( )
inline

Definition at line 83 of file btStackAlloc.h.

References btBlock::address, allocate(), btBlock::previous, and SIMD_FORCE_INLINE.

◆ create()

void btStackAlloc::create ( unsigned int size)
inline

Definition at line 44 of file btStackAlloc.h.

References btAlignedAlloc, destroy(), and size().

Referenced by btStackAlloc().

◆ destroy()

void btStackAlloc::destroy ( )
inline

Definition at line 50 of file btStackAlloc.h.

References btAlignedFree, and btAssert.

Referenced by create(), and ~btStackAlloc().

◆ endBlock()

SIMD_FORCE_INLINE void btStackAlloc::endBlock ( btBlock * block)
inline

Definition at line 91 of file btStackAlloc.h.

References btBlock::address, btAssert, btBlock::previous, and SIMD_FORCE_INLINE.

◆ getAvailableMemory()

int btStackAlloc::getAvailableMemory ( ) const
inline

Definition at line 65 of file btStackAlloc.h.


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