NAME

kjb_mt_malloc - Threadsafe memory allocation

SYNOPSIS

#include "l_mt/l_mt_util.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_mt_malloc(Malloc_size num_bytes);

DESCRIPTION

This allocates memory using libkjb routines in a threadsafe way, because it uses the multithread wrapper serialization lock. Only one thread at a time can malloc memory via this function. In all other respects this operates like kjb_malloc.

RETURNS

NULL if allocation is unsuccessful, along with an error message. Otherwise, this returns a pointer to the memory block of the requested size.

RELATED

kjb_malloc, kjb_free, kjb_mt_free

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Andrew Predoehl

DOCUMENTER

Andrew Predoehl

SEE ALSO

kjb_mt_free , kjb_mt_fopen , kjb_mt_fread , kjb_mt_fwrite , kjb_mt_fprintf , kjb_mt_fclose