memcluster.h revision 2
2N/A/*
2N/A * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
2N/A * Copyright (c) 1997,1999 by Internet Software Consortium.
2N/A *
2N/A * Permission to use, copy, modify, and distribute this software for any
2N/A * purpose with or without fee is hereby granted, provided that the above
2N/A * copyright notice and this permission notice appear in all copies.
2N/A *
2N/A * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
2N/A * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2N/A * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
2N/A * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2N/A * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
2N/A * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2N/A */
2N/A
2N/A#ifndef MEMCLUSTER_H
2N/A#define MEMCLUSTER_H
2N/A
2N/A#include <stdio.h>
2N/A
2N/A#define meminit __meminit
2N/A#ifdef MEMCLUSTER_DEBUG
2N/A#define memget(s) __memget_debug(s, __FILE__, __LINE__)
2N/A#define memput(p, s) __memput_debug(p, s, __FILE__, __LINE__)
2N/A#else /*MEMCLUSTER_DEBUG*/
2N/A#ifdef MEMCLUSTER_RECORD
2N/A#define memget(s) __memget_record(s, __FILE__, __LINE__)
2N/A#define memput(p, s) __memput_record(p, s, __FILE__, __LINE__)
2N/A#else /*MEMCLUSTER_RECORD*/
2N/A#define memget __memget
2N/A#define memput __memput
2N/A#endif /*MEMCLUSTER_RECORD*/
2N/A#endif /*MEMCLUSTER_DEBUG*/
2N/A#define memstats __memstats
2N/A#define memactive __memactive
2N/A
2N/Aint meminit(size_t, size_t);
2N/Avoid * __memget(size_t);
2N/Avoid __memput(void *, size_t);
2N/Avoid * __memget_debug(size_t, const char *, int);
2N/Avoid __memput_debug(void *, size_t, const char *, int);
2N/Avoid * __memget_record(size_t, const char *, int);
2N/Avoid __memput_record(void *, size_t, const char *, int);
2N/Avoid memstats(FILE *);
2N/Aint memactive(void);
2N/A
2N/A#endif /* MEMCLUSTER_H */
2N/A/*! \file */