HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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)
#define UT_STACK_LIMIT
Definition: UT_StackAlloc.h:28
GLsizeiptr size
Definition: glcorearb.h:663
#define UT_STACK_ALLOCA
Definition: UT_StackAlloc.h:31
int int32
Definition: SYS_Types.h:28
#define UT_STACK_MALLOC
Definition: UT_StackAlloc.h:32

Definition at line 34 of file UT_StackAlloc.h.

#define UTstackFree (   ptr)
Value:
{ \
*((int32 *)ptr - 2) == UT_STACK_ALLOCA); \
if (*((int32 *)ptr - 2) == UT_STACK_MALLOC) \
::free(((int32 *)ptr - 2)); \
}
png_voidp ptr
Definition: png.h:2145
#define UT_ASSERT_P(ZZ)
Definition: UT_Assert.h:101
#define UT_STACK_ALLOCA
Definition: UT_StackAlloc.h:31
int int32
Definition: SYS_Types.h:28
#define UT_STACK_MALLOC
Definition: UT_StackAlloc.h:32

Definition at line 38 of file UT_StackAlloc.h.