Defines | Functions | Variables

lt__alloc.h File Reference

#include "lt_system.h"

Go to the source code of this file.

Defines

#define MALLOC(tp, n)   (tp*) lt__malloc((n) * sizeof(tp))
#define REALLOC(tp, mem, n)   (tp*) lt__realloc((mem), (n) * sizeof(tp))
#define FREE(mem)
#define MEMREASSIGN(p, q)

Functions

LT_SCOPE void * lt__malloc (size_t n)
LT_SCOPE void * lt__zalloc (size_t n)
LT_SCOPE void * lt__realloc (void *mem, size_t n)
LT_SCOPE void * lt__memdup (void const *mem, size_t n)
LT_SCOPE char * lt__strdup (const char *string)

Variables

LT_SCOPE void(* lt__alloc_die )(void)

Define Documentation

#define FREE (   mem  ) 
#define MALLOC (   tp,
  n 
)    (tp*) lt__malloc((n) * sizeof(tp))

Referenced by lt_dlsym().

#define MEMREASSIGN (   p,
  q 
)
Value:
LT_STMT_START { \
        if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; }        \
                                                                } LT_STMT_END
#define REALLOC (   tp,
  mem,
  n 
)    (tp*) lt__realloc((mem), (n) * sizeof(tp))

Function Documentation

LT_SCOPE void* lt__malloc ( size_t  n  ) 

References malloc().

Referenced by lt__memdup(), lt__zalloc(), and lt_dlinterface_register().

LT_SCOPE void* lt__memdup ( void const *  mem,
size_t  n 
)

References lt__malloc().

Referenced by lt__strdup().

LT_SCOPE void* lt__realloc ( void *  mem,
size_t  n 
)

References realloc().

LT_SCOPE char* lt__strdup ( const char *  string  ) 

References lt__memdup().

Referenced by lt_dlinterface_register().

LT_SCOPE void* lt__zalloc ( size_t  n  ) 

References lt__malloc().

Referenced by get_vtable(), and lt_dladvise_init().


Variable Documentation

LT_SCOPE void(* lt__alloc_die)(void)

Referenced by lt_dlinit().