mem.h revision de9282a1eaa50764fdc2e88046f8ff3522e3092e
/*
* Copyright (c) 1997, 1998 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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 ISC_MEMCLUSTER_H
#define ISC_MEMCLUSTER_H 1
#include <stdio.h>
#include <stddef.h>
typedef struct isc_memctx * isc_memctx_t;
#define isc_memctx_create __isc_memctx_create
#ifdef ISC_MEMCLUSTER_DEBUG
#else
#define isc_mem_get __isc_mem_get
#define isc_mem_put __isc_mem_put
#endif /* ISC_MEMCLUSTER_DEBUG */
#define isc_mem_valid __isc_mem_valid
#define isc_mem_stats __isc_mem_stats
#define isc_mem_allocate __isc_mem_allocate
#define isc_mem_free __isc_mem_free
isc_memctx_t *);
void isc_memctx_destroy(isc_memctx_t *);
const char *, int);
void __isc_mem_putdebug(isc_memctx_t, void *,
size_t, const char *, int);
void isc_mem_free(isc_memctx_t, void *);
#ifdef ISC_MEMCLUSTER_LEGACY
/*
* Legacy.
*/
#ifdef MEMCLUSTER_DEBUG
#else
#endif
#define memvalid __memvalid
#define memstats __memstats
isc_memctx_t mem_default_context(void);
void * __memget_debug(size_t, const char *, int);
void __memput_debug(void *, size_t, const char *,
int);
int memvalid(void *);
#endif /* ISC_MEMCLUSTER_LEGACY */
#endif /* MEMCLUSTER_H */