mem.h revision 3740b569ae76295b941d57a724a43beb75b533ba
/*
* Copyright (C) 1997, 1998 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;
#ifdef ISC_MEMCLUSTER_DEBUG
#else
#define isc_mem_get isc_mem_get
#define isc_mem_put isc_mem_put
#endif /* ISC_MEMCLUSTER_DEBUG */
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 */