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