xref: /netbsd-src/lib/libc/include/isc/memcluster.h (revision c6497e5b5fd6f3aacf9040dabb7d54cbfb35a2e1)
1*c6497e5bSchristos /*	$NetBSD: memcluster.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $	*/
289abd492Schristos 
389abd492Schristos /*
489abd492Schristos  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
589abd492Schristos  * Copyright (c) 1997,1999 by Internet Software Consortium.
689abd492Schristos  *
789abd492Schristos  * Permission to use, copy, modify, and distribute this software for any
889abd492Schristos  * purpose with or without fee is hereby granted, provided that the above
989abd492Schristos  * copyright notice and this permission notice appear in all copies.
1089abd492Schristos  *
1189abd492Schristos  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
1289abd492Schristos  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1389abd492Schristos  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
1489abd492Schristos  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1589abd492Schristos  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1689abd492Schristos  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1789abd492Schristos  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1889abd492Schristos  */
1989abd492Schristos 
2089abd492Schristos #ifndef MEMCLUSTER_H
2189abd492Schristos #define MEMCLUSTER_H
2289abd492Schristos 
2389abd492Schristos #include <stdio.h>
2489abd492Schristos 
2589abd492Schristos #define meminit		__meminit
2689abd492Schristos #ifdef MEMCLUSTER_DEBUG
2789abd492Schristos #define memget(s)	__memget_debug(s, __FILE__, __LINE__)
2889abd492Schristos #define memput(p, s)	__memput_debug(p, s, __FILE__, __LINE__)
2989abd492Schristos #else /*MEMCLUSTER_DEBUG*/
3089abd492Schristos #ifdef MEMCLUSTER_RECORD
3189abd492Schristos #define memget(s)	__memget_record(s, __FILE__, __LINE__)
3289abd492Schristos #define memput(p, s)	__memput_record(p, s, __FILE__, __LINE__)
3389abd492Schristos #else /*MEMCLUSTER_RECORD*/
3489abd492Schristos #define memget		__memget
3589abd492Schristos #define memput		__memput
3689abd492Schristos #endif /*MEMCLUSTER_RECORD*/
3789abd492Schristos #endif /*MEMCLUSTER_DEBUG*/
3889abd492Schristos #define memstats	__memstats
3989abd492Schristos #define memactive	__memactive
4089abd492Schristos 
4189abd492Schristos int	meminit(size_t, size_t);
4289abd492Schristos void *	__memget(size_t);
4389abd492Schristos void 	__memput(void *, size_t);
4489abd492Schristos void *	__memget_debug(size_t, const char *, int);
4589abd492Schristos void 	__memput_debug(void *, size_t, const char *, int);
4689abd492Schristos void *	__memget_record(size_t, const char *, int);
4789abd492Schristos void 	__memput_record(void *, size_t, const char *, int);
4889abd492Schristos void 	memstats(FILE *);
4989abd492Schristos int	memactive(void);
5089abd492Schristos 
5189abd492Schristos #endif /* MEMCLUSTER_H */
528e42b6c9Schristos /*! \file */
53