1c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Declarations for `malloc' and friends.
2c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
3c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o		  Written May 1989 by Mike Haertel.
4c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
5c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oThis library is free software; you can redistribute it and/or
6c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'omodify it under the terms of the GNU Library General Public License as
7c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'opublished by the Free Software Foundation; either version 2 of the
8c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oLicense, or (at your option) any later version.
9c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
10c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oThis library is distributed in the hope that it will be useful,
11c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'obut WITHOUT ANY WARRANTY; without even the implied warranty of
12c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oLibrary General Public License for more details.
14c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
15c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oYou should have received a copy of the GNU Library General Public
16c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oLicense along with this library; see the file COPYING.LIB.  If
17c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'onot, write to the Free Software Foundation, Inc., 675 Mass Ave,
18c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oCambridge, MA 02139, USA.
19c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
20c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   The author may be reached (Email) at the address mike@ai.mit.edu,
21c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   or (US mail) as Mike Haertel c/o Free Software Foundation.  */
22c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
23c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifndef _MTRACE_H
24c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
25c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define _MTRACE_H	1
26c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
27c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifdef	__cplusplus
28c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern "C"
29c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o{
30c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
31c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
32c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
33c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	__P
34c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	__P(args)	args
35c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	__ptr_t
36c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	__ptr_t		void *
37c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#else /* Not C++ or ANSI C.  */
38c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	__P
39c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	__P(args)	()
40c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	const
41c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	const
42c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	__ptr_t
43c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	__ptr_t		char *
44c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif /* C++ or ANSI C.  */
45c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
46c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifndef	NULL
47c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	NULL	0
48c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
49c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
50c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifdef	__STDC__
51c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#include <stddef.h>
52c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#else
53c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	size_t
54c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	size_t		unsigned int
55c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#undef	ptrdiff_t
56c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	ptrdiff_t	int
57c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
58c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
59c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
60c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Allocate SIZE bytes of memory.  */
61c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t malloc __P ((size_t __size));
62c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Re-allocate the previously allocated block
63c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   in __ptr_t, making the new block SIZE bytes long.  */
64c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t realloc __P ((__ptr_t __ptr, size_t __size));
65c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0.  */
66c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t calloc __P ((size_t __nmemb, size_t __size));
67c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Free a block allocated by `malloc', `realloc' or `calloc'.  */
68c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern void free __P ((__ptr_t __ptr));
69c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
70c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Allocate SIZE bytes allocated to ALIGNMENT bytes.  */
71c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t memalign __P ((size_t __alignment, size_t __size));
72c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
73c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Allocate SIZE bytes on a page boundary.  */
74c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t valloc __P ((size_t __size));
75c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
76c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
77c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifdef _MALLOC_INTERNAL
78c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
79c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#include <stdio.h>		/* Harmless, gets __GNU_LIBRARY__ defined.  */
80c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
81c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#if	defined(__GNU_LIBRARY__) || defined(STDC_HEADERS) || defined(USG)
82c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#include <string.h>
83c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#else
84c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifndef memset
85c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	memset(s, zero, n)	bzero ((s), (n))
86c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
87c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifndef memcpy
88c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	memcpy(d, s, n)		bcopy ((s), (d), (n))
89c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
90c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
91c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
92c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
93c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#if	defined(__GNU_LIBRARY__) || defined(__STDC__)
94c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#include <limits.h>
95c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#else
96c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define	CHAR_BIT	8
97c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
98c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
99c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* The allocator divides the heap into blocks of fixed size; large
100c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   requests receive one or more whole blocks, and small requests
101c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   receive a fragment of a block.  Fragment sizes are powers of two,
102c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   and all fragments of a block are the same size.  When all the
103c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   fragments in a block have been freed, the block itself is freed.  */
104c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define INT_BIT		(CHAR_BIT * sizeof(int))
105c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define BLOCKLOG	(INT_BIT > 16 ? 12 : 9)
106c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define BLOCKSIZE	(1 << BLOCKLOG)
107c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define BLOCKIFY(SIZE)	(((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)
108c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
109c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Determine the amount of memory spanned by the initial heap table
110c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   (not an absolute limit).  */
111c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define HEAP		(INT_BIT > 16 ? 4194304 : 65536)
112c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
113c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Number of contiguous free blocks allowed to build up at the end of
114c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   memory before they will be returned to the system.  */
115c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define FINAL_FREE_BLOCKS	8
116c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
117c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Data structure giving per-block information.  */
118c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'otypedef union
119c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  {
120c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    /* Heap information for a busy block.  */
121c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    struct
122c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o      {
123c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	/* Zero for a large block, or positive giving the
124c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	   logarithm to the base two of the fragment size.  */
125c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	int type;
126c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	union
127c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	  {
128c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	    struct
129c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	      {
130c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o		size_t nfree;	/* Free fragments in a fragmented block.  */
131c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o		size_t first;	/* First free fragment of the block.  */
132c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	      } frag;
133c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	    /* Size (in blocks) of a large cluster.  */
134c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	    size_t size;
135c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	  } info;
136c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o      } busy;
137c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    /* Heap information for a free block
138c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o       (that may be the first of a free cluster).  */
139c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    struct
140c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o      {
141c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	size_t size;		/* Size (in blocks) of a free cluster.  */
142c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	size_t next;		/* Index of next free cluster.  */
143c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o	size_t prev;		/* Index of previous free cluster.  */
144c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o      } free;
145c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  } malloc_info;
146c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
147c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Pointer to first block of the heap.  */
148c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern char *_heapbase;
149c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
150c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Table indexed by block number giving per-block information.  */
151c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern malloc_info *_heapinfo;
152c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
153c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Address to block number and vice versa.  */
154c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define BLOCK(A)	(((char *) (A) - _heapbase) / BLOCKSIZE + 1)
155c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#define ADDRESS(B)	((__ptr_t) (((B) - 1) * BLOCKSIZE + _heapbase))
156c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
157c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Current search index for the heap table.  */
158c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern size_t _heapindex;
159c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
160c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Limit of valid info table indices.  */
161c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern size_t _heaplimit;
162c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
163c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Doubly linked lists of free fragments.  */
164c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'ostruct list
165c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  {
166c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    struct list *next;
167c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    struct list *prev;
168c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  };
169c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
170c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Free list headers for each fragment size.  */
171c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern struct list _fraghead[];
172c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
173c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* List of blocks allocated with `memalign' (or `valloc').  */
174c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'ostruct alignlist
175c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  {
176c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    struct alignlist *next;
177c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    __ptr_t aligned;		/* The address that memaligned returned.  */
178c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    __ptr_t exact;		/* The address that malloc returned.  */
179c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  };
180c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern struct alignlist *_aligned_blocks;
181c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
182c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Instrumentation.  */
183c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern size_t _chunks_used;
184c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern size_t _bytes_used;
185c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern size_t _chunks_free;
186c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern size_t _bytes_free;
187c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
188c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Internal version of `free' used in `morecore' (malloc.c). */
189c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern void _free_internal __P ((__ptr_t __ptr));
190c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
191c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif /* _MALLOC_INTERNAL.  */
192c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
193c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Underlying allocation function; successive calls should
194c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o   return contiguous pieces of memory.  */
195c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t (*__morecore) __P ((ptrdiff_t __size));
196c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
197c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Default value of `__morecore'.  */
198c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t __default_morecore __P ((ptrdiff_t __size));
199c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
200c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Nonzero if `malloc' has been called and done its initialization.  */
201c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern int __malloc_initialized;
202c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
203c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Hooks for debugging versions.  */
204c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern void (*__free_hook) __P ((__ptr_t __ptr));
205c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t (*__malloc_hook) __P ((size_t __size));
206c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern __ptr_t (*__realloc_hook) __P ((__ptr_t __ptr, size_t __size));
207c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
208c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Activate a standard collection of debugging hooks.  */
209c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern void mcheck __P ((void (*__func) __P ((void))));
210c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
211c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Activate a standard collection of tracing hooks.  */
212c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern void mtrace __P ((void));
213c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
214c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Statistics available to the user.  */
215c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'ostruct mstats
216c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  {
217c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    size_t bytes_total;		/* Total size of the heap. */
218c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    size_t chunks_used;		/* Chunks allocated by the user. */
219c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    size_t bytes_used;		/* Byte total of user-allocated chunks. */
220c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    size_t chunks_free;		/* Chunks in the free list. */
221c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o    size_t bytes_free;		/* Byte total of chunks in the free list. */
222c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o  };
223c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
224c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o/* Pick up the current statistics. */
225c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'oextern struct mstats mstats __P ((void));
226c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
227c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#ifdef	__cplusplus
228c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o}
229c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o#endif
230c59a704b79cbb9e35050d4555b149b780149069dTheodore Ts'o
231721edd0eddcfb4ebdd4fba22338a674477795acdTheodore Ts'o#endif /* mtrace.h  */
232