Blender V2.61 - r43446
Functions | Variables

gim_memory.cpp File Reference

#include "gim_memory.h"
#include "stdlib.h"

Go to the source code of this file.

Functions

void gim_set_alloc_handler (gim_alloc_function *fn)
void gim_set_alloca_handler (gim_alloca_function *fn)
void gim_set_realloc_handler (gim_realloc_function *fn)
void gim_set_free_handler (gim_free_function *fn)
gim_alloc_functiongim_get_alloc_handler ()
 get current memory management functions.
gim_alloca_functiongim_get_alloca_handler ()
gim_realloc_functiongim_get_realloc_handler ()
gim_free_functiongim_get_free_handler ()
void * gim_alloc (size_t size)
 Standar Memory functions.
void * gim_alloca (size_t size)
void * gim_realloc (void *ptr, size_t oldsize, size_t newsize)
void gim_free (void *ptr)

Variables

static gim_alloc_functiong_allocfn = 0
static gim_alloca_functiong_allocafn = 0
static gim_realloc_functiong_reallocfn = 0
static gim_free_functiong_freefn = 0

Function Documentation

void* gim_alloc ( size_t  size)
void* gim_alloca ( size_t  size)

Definition at line 104 of file gim_memory.cpp.

References g_allocafn, and gim_alloc().

void gim_free ( void *  ptr)
gim_alloc_function* gim_get_alloc_handler ( void  )

get current memory management functions.

Definition at line 63 of file gim_memory.cpp.

References g_allocfn.

gim_alloca_function* gim_get_alloca_handler ( void  )

Definition at line 68 of file gim_memory.cpp.

References g_allocafn.

gim_free_function* gim_get_free_handler ( void  )

Definition at line 80 of file gim_memory.cpp.

References g_freefn.

gim_realloc_function* gim_get_realloc_handler ( void  )

Definition at line 74 of file gim_memory.cpp.

References g_reallocfn.

void* gim_realloc ( void *  ptr,
size_t  oldsize,
size_t  newsize 
)

Definition at line 110 of file gim_memory.cpp.

References gim_alloc(), gim_free(), and gim_simd_memcpy().

Referenced by gim_array< GIM_CONTACT >::resizeData().

void gim_set_alloc_handler ( gim_alloc_function fn)

Memory Function Handlers set new memory management functions. if fn is 0, the default handlers are used.

Definition at line 43 of file gim_memory.cpp.

References g_allocfn.

void gim_set_alloca_handler ( gim_alloca_function fn)

Definition at line 48 of file gim_memory.cpp.

References g_allocafn.

void gim_set_free_handler ( gim_free_function fn)

Definition at line 58 of file gim_memory.cpp.

References g_freefn.

void gim_set_realloc_handler ( gim_realloc_function fn)

Definition at line 53 of file gim_memory.cpp.

References g_reallocfn.


Variable Documentation

Definition at line 39 of file gim_memory.cpp.

Referenced by gim_alloca(), gim_get_alloca_handler(), and gim_set_alloca_handler().

Definition at line 38 of file gim_memory.cpp.

Referenced by gim_alloc(), gim_get_alloc_handler(), and gim_set_alloc_handler().

gim_free_function* g_freefn = 0 [static]

Definition at line 41 of file gim_memory.cpp.

Referenced by gim_free(), gim_get_free_handler(), and gim_set_free_handler().

Definition at line 40 of file gim_memory.cpp.

Referenced by gim_get_realloc_handler(), and gim_set_realloc_handler().