xref: /titanic_50/usr/src/lib/libresolv2/include/isc/memcluster.h (revision 23a1ccea6aac035f084a7a4cdc968687d1b02daf)
1 /*
2  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (c) 1997,1999 by Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 #ifndef MEMCLUSTER_H
19 #define MEMCLUSTER_H
20 
21 #include <stdio.h>
22 
23 #define meminit		__meminit
24 #ifdef MEMCLUSTER_DEBUG
25 #define memget(s)	__memget_debug(s, __FILE__, __LINE__)
26 #define memput(p, s)	__memput_debug(p, s, __FILE__, __LINE__)
27 #else /*MEMCLUSTER_DEBUG*/
28 #ifdef MEMCLUSTER_RECORD
29 #define memget(s)	__memget_record(s, __FILE__, __LINE__)
30 #define memput(p, s)	__memput_record(p, s, __FILE__, __LINE__)
31 #else /*MEMCLUSTER_RECORD*/
32 #define memget		__memget
33 #define memput		__memput
34 #endif /*MEMCLUSTER_RECORD*/
35 #endif /*MEMCLUSTER_DEBUG*/
36 #define memstats	__memstats
37 #define memactive	__memactive
38 
39 int	meminit(size_t, size_t);
40 void *	__memget(size_t);
41 void 	__memput(void *, size_t);
42 void *	__memget_debug(size_t, const char *, int);
43 void 	__memput_debug(void *, size_t, const char *, int);
44 void *	__memget_record(size_t, const char *, int);
45 void 	__memput_record(void *, size_t, const char *, int);
46 void 	memstats(FILE *);
47 int	memactive(void);
48 
49 #endif /* MEMCLUSTER_H */
50 /*! \file */
51