xref: /onnv-gate/usr/src/lib/libresolv2/include/isc/memcluster.h (revision 11038:74b12212b8a2)
10Sstevel@tonic-gate /*
2*11038SRao.Shoaib@Sun.COM  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
30Sstevel@tonic-gate  * Copyright (c) 1997,1999 by Internet Software Consortium.
40Sstevel@tonic-gate  *
50Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
60Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
70Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
80Sstevel@tonic-gate  *
9*11038SRao.Shoaib@Sun.COM  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*11038SRao.Shoaib@Sun.COM  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*11038SRao.Shoaib@Sun.COM  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*11038SRao.Shoaib@Sun.COM  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*11038SRao.Shoaib@Sun.COM  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*11038SRao.Shoaib@Sun.COM  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*11038SRao.Shoaib@Sun.COM  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160Sstevel@tonic-gate  */
170Sstevel@tonic-gate 
180Sstevel@tonic-gate #ifndef MEMCLUSTER_H
190Sstevel@tonic-gate #define MEMCLUSTER_H
200Sstevel@tonic-gate 
210Sstevel@tonic-gate #include <stdio.h>
220Sstevel@tonic-gate 
230Sstevel@tonic-gate #define meminit		__meminit
240Sstevel@tonic-gate #ifdef MEMCLUSTER_DEBUG
250Sstevel@tonic-gate #define memget(s)	__memget_debug(s, __FILE__, __LINE__)
260Sstevel@tonic-gate #define memput(p, s)	__memput_debug(p, s, __FILE__, __LINE__)
270Sstevel@tonic-gate #else /*MEMCLUSTER_DEBUG*/
280Sstevel@tonic-gate #ifdef MEMCLUSTER_RECORD
290Sstevel@tonic-gate #define memget(s)	__memget_record(s, __FILE__, __LINE__)
300Sstevel@tonic-gate #define memput(p, s)	__memput_record(p, s, __FILE__, __LINE__)
310Sstevel@tonic-gate #else /*MEMCLUSTER_RECORD*/
320Sstevel@tonic-gate #define memget		__memget
330Sstevel@tonic-gate #define memput		__memput
340Sstevel@tonic-gate #endif /*MEMCLUSTER_RECORD*/
350Sstevel@tonic-gate #endif /*MEMCLUSTER_DEBUG*/
360Sstevel@tonic-gate #define memstats	__memstats
370Sstevel@tonic-gate #define memactive	__memactive
380Sstevel@tonic-gate 
390Sstevel@tonic-gate int	meminit(size_t, size_t);
400Sstevel@tonic-gate void *	__memget(size_t);
410Sstevel@tonic-gate void 	__memput(void *, size_t);
420Sstevel@tonic-gate void *	__memget_debug(size_t, const char *, int);
430Sstevel@tonic-gate void 	__memput_debug(void *, size_t, const char *, int);
440Sstevel@tonic-gate void *	__memget_record(size_t, const char *, int);
450Sstevel@tonic-gate void 	__memput_record(void *, size_t, const char *, int);
460Sstevel@tonic-gate void 	memstats(FILE *);
470Sstevel@tonic-gate int	memactive(void);
480Sstevel@tonic-gate 
490Sstevel@tonic-gate #endif /* MEMCLUSTER_H */
50*11038SRao.Shoaib@Sun.COM /*! \file */
51