NAME
kjb_free - KJB library replacement for free
SYNOPSIS
#include "l/l_sys_mal.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
void kjb_free(void *ptr);
DESCRIPTION
This routine frees memory allocated by kjb_malloc or kjb_calloc, and in
conjunction with those routines provides error checking in the case of
development code as described in kjb_malloc. One important additional
difference between kjb_free and "free", is that it is always safe to send
kjb_free a NULL pointer. (In fact, it should be safe to send all KJB library
destruction code a NULL pointer.) It is OK to send free a NULL pointer in
conformaing ANSI C, but many non-ANSI C environments break if you send free a
NULL. Using kjb_free is one way to be sure.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
memory_used
,
kjb_malloc
,
kjb_calloc
,
kjb_realloc
,
watch_for_free
,
check_initialization
,
optimize_free
,
optimize_free_2