HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_StackAlloc.h File Reference
#include "UT_Assert.h"
#include <alloca.h>
+ Include dependency graph for UT_StackAlloc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UT_STACK_LIMIT   131072
 
#define UT_STACK_ALLOCA   100
 
#define UT_STACK_MALLOC   200
 
#define UTstackAlloc(size)
 
#define UTstackFree(ptr)
 

Macro Definition Documentation

#define UT_STACK_ALLOCA   100

Definition at line 31 of file UT_StackAlloc.h.

#define UT_STACK_LIMIT   131072

Definition at line 28 of file UT_StackAlloc.h.

#define UT_STACK_MALLOC   200

Definition at line 32 of file UT_StackAlloc.h.

#define UTstackAlloc (   size)
Value:
(void *)(&((size < UT_STACK_LIMIT) ? \
(*((int32 *)::alloca(size+2*sizeof(int32))) = UT_STACK_ALLOCA) : \
(*((int32 *)::malloc(size+2*sizeof(int32))) = UT_STACK_MALLOC)) + 2)
int int32
Definition: SYS_Types.h:39
#define UT_STACK_LIMIT
Definition: UT_StackAlloc.h:28
#define UT_STACK_ALLOCA
Definition: UT_StackAlloc.h:31
#define UT_STACK_MALLOC
Definition: UT_StackAlloc.h:32
GLsizeiptr size
Definition: glcorearb.h:664

Definition at line 34 of file UT_StackAlloc.h.

#define UTstackFree (   ptr)
Value:
{ \
*((int32 *)ptr - 2) == UT_STACK_MALLOC || \
*((int32 *)ptr - 2) == UT_STACK_ALLOCA); \
if (ptr && (*((int32 *)ptr - 2) == UT_STACK_MALLOC)) \
::free(((int32 *)ptr - 2)); \
}
int int32
Definition: SYS_Types.h:39
#define UT_ASSERT_P(ZZ)
Definition: UT_Assert.h:155
#define UT_STACK_ALLOCA
Definition: UT_StackAlloc.h:31
#define UT_STACK_MALLOC
Definition: UT_StackAlloc.h:32
auto ptr(T p) -> const void *
Definition: format.h:2448
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697

Definition at line 38 of file UT_StackAlloc.h.