Details
xmalloc()
#define xmalloc(x) _xmalloc(x,__FILE__,__LINE__) |
xrealloc()
#define xrealloc(p,x) _xrealloc(p, x,__FILE__,__LINE__) |
xstrdup()
#define xstrdup(str) _xstrdup(str,__FILE__,__LINE__) |
xdoneinit ()
Marks end of an applications initialization period. For media
applications with real-time data transfer it's sometimes helpful to
distinguish between memory allocated during application
initialization and when application is running.
xmemchk ()
Check for bounds overruns in all memory allocated with xmalloc(),
xrealloc(), and xstrdup(). Information on corrupted blocks is
rendered on the standard error stream. This includes where the
block was allocated, the size of the block, and the number of
allocations made since the block was created.
xmemdmp ()
Dumps the address, size, age, and point of allocation in code.
xclaim ()
void xclaim (void *addr,
const char *filen,
int line); |
Coerces information in allocation table about allocation file and
line to be filen and line. This is used by the evil
block_alloc() and should probably not be used anywhere else ever.
xmemdist ()
void xmemdist (FILE *fp); |
Dumps information on existing memory allocations to file.
xfree ()
Free block of memory. Semantically equivalent to free(), but
checks for bounds overruns in p and tidies up state associated
additional functionality.
Must be used to free memory allocated with xmalloc(), xrealloc(),
and xstrdup().