w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

mem.h File Reference
#include <stdlib.h>
Include dependency graph for mem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MEM_START
 
#define MEM_END
 
#define NEW(n, type)   (type *)(new (((size_t) (n))*sizeof(type),NULL,0))
 
#define RENEW(p, n, type)   (type *)(renew ((p),(n)*sizeof(type),NULL,0))
 
#define RELEASE(p)   release ((p),NULL,0)
 

Functions

voidnew (size_t size, char *function, int line)
 
voidrenew (void *p, size_t size, char *function, int line)
 
void release (void *mem, char *function, int line)
 

Macro Definition Documentation

◆ MEM_END

#define MEM_END

Definition at line 45 of file mem.h.

◆ MEM_START

#define MEM_START

Definition at line 44 of file mem.h.

◆ NEW

#define NEW (   n,
  type 
)    (type *)(new (((size_t) (n))*sizeof(type),NULL,0))

Definition at line 46 of file mem.h.

◆ RELEASE

#define RELEASE (   p)    release ((p),NULL,0)

Definition at line 48 of file mem.h.

◆ RENEW

#define RENEW (   p,
  n,
  type 
)    (type *)(renew ((p),(n)*sizeof(type),NULL,0))

Definition at line 47 of file mem.h.

Function Documentation

◆ new()

void* new ( size_t  size,
char *  function,
int  line 
)

Definition at line 45 of file mem.c.

References exit(), fprintf, malloc, NULL, check-static-inits::result, and size.

◆ release()

void release ( void mem,
char *  function,
int  line 
)

Definition at line 85 of file mem.c.

References fprintf, free, and mem.

◆ renew()

void* renew ( void p,
size_t  size,
char *  function,
int  line 
)

Definition at line 63 of file mem.c.

References exit(), fprintf, mem, NULL, realloc, check-static-inits::result, and size.