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