17c478bd9Sstevel@tonic-gate /*
2*9525b14bSRao Shoaib  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
37c478bd9Sstevel@tonic-gate  * Copyright (c) 1997,1999 by Internet Software Consortium.
47c478bd9Sstevel@tonic-gate  *
57c478bd9Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
67c478bd9Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
77c478bd9Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
87c478bd9Sstevel@tonic-gate  *
9*9525b14bSRao Shoaib  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*9525b14bSRao Shoaib  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*9525b14bSRao Shoaib  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*9525b14bSRao Shoaib  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*9525b14bSRao Shoaib  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*9525b14bSRao Shoaib  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*9525b14bSRao Shoaib  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
167c478bd9Sstevel@tonic-gate  */
177c478bd9Sstevel@tonic-gate 
187c478bd9Sstevel@tonic-gate #ifndef MEMCLUSTER_H
197c478bd9Sstevel@tonic-gate #define MEMCLUSTER_H
207c478bd9Sstevel@tonic-gate 
217c478bd9Sstevel@tonic-gate #include <stdio.h>
227c478bd9Sstevel@tonic-gate 
237c478bd9Sstevel@tonic-gate #define meminit		__meminit
247c478bd9Sstevel@tonic-gate #ifdef MEMCLUSTER_DEBUG
257c478bd9Sstevel@tonic-gate #define memget(s)	__memget_debug(s, __FILE__, __LINE__)
267c478bd9Sstevel@tonic-gate #define memput(p, s)	__memput_debug(p, s, __FILE__, __LINE__)
277c478bd9Sstevel@tonic-gate #else /*MEMCLUSTER_DEBUG*/
287c478bd9Sstevel@tonic-gate #ifdef MEMCLUSTER_RECORD
297c478bd9Sstevel@tonic-gate #define memget(s)	__memget_record(s, __FILE__, __LINE__)
307c478bd9Sstevel@tonic-gate #define memput(p, s)	__memput_record(p, s, __FILE__, __LINE__)
317c478bd9Sstevel@tonic-gate #else /*MEMCLUSTER_RECORD*/
327c478bd9Sstevel@tonic-gate #define memget		__memget
337c478bd9Sstevel@tonic-gate #define memput		__memput
347c478bd9Sstevel@tonic-gate #endif /*MEMCLUSTER_RECORD*/
357c478bd9Sstevel@tonic-gate #endif /*MEMCLUSTER_DEBUG*/
367c478bd9Sstevel@tonic-gate #define memstats	__memstats
377c478bd9Sstevel@tonic-gate #define memactive	__memactive
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate int	meminit(size_t, size_t);
407c478bd9Sstevel@tonic-gate void *	__memget(size_t);
417c478bd9Sstevel@tonic-gate void 	__memput(void *, size_t);
427c478bd9Sstevel@tonic-gate void *	__memget_debug(size_t, const char *, int);
437c478bd9Sstevel@tonic-gate void 	__memput_debug(void *, size_t, const char *, int);
447c478bd9Sstevel@tonic-gate void *	__memget_record(size_t, const char *, int);
457c478bd9Sstevel@tonic-gate void 	__memput_record(void *, size_t, const char *, int);
467c478bd9Sstevel@tonic-gate void 	memstats(FILE *);
477c478bd9Sstevel@tonic-gate int	memactive(void);
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate #endif /* MEMCLUSTER_H */
50*9525b14bSRao Shoaib /*! \file */
51