modules/ut/memwrap.h

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. wr_malloc
  2. wr_calloc
  3. wr_realloc
  4. wr_free

/***************************************
  $Revision: 1.3 $

  Utilities (ut). memwrap.h - header file for memory allocation wrappers. 

  Status: NOT REVUED, TESTED, 

  Design and implementation by: Marek Bukowy

  ******************/ /******************
  Copyright (c) 1999                              RIPE NCC
 
  All Rights Reserved
  
  Permission to use, copy, modify, and distribute this software and its
  documentation for any purpose and without fee is hereby granted,
  provided that the above copyright notice appear in all copies and that
  both that copyright notice and this permission notice appear in
  supporting documentation, and that the name of the author not be
  used in advertising or publicity pertaining to distribution of the
  software without specific, written prior permission.
  
  THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
  AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
  DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  ***************************************/

#ifndef _MEMWRAP_H
#define _MEMWRAP_H

#include <erroutines.h>
/*
er_ret_t wr_real_malloc(void **ptr, size_t size) ;
er_ret_t wr_real_calloc(void **ptr, size_t num, size_t size) ;
er_ret_t wr_real_realloc(void **ptr, void *oldptr, size_t size) ;
er_ret_t wr_real_free(void *ptr) ;
*/ 
#define wr_malloc(a,b)    wr_real_malloc(a,b,   __FILE__ ,__LINE__)
/* [<][>][^][v][top][bottom][index][help] */
#define wr_calloc(a,b,c)  wr_real_calloc(a,b,c, __FILE__ ,__LINE__)
/* [<][>][^][v][top][bottom][index][help] */
#define wr_realloc(a,b,c) wr_real_realloc(a,b,c,__FILE__ ,__LINE__)
/* [<][>][^][v][top][bottom][index][help] */
#define wr_free(a)        wr_real_free(a,       __FILE__ ,__LINE__)
/* [<][>][^][v][top][bottom][index][help] */

#endif /* _MEMWRAP_H */

/* [<][>][^][v][top][bottom][index][help] */