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