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