1 /* Access the statistics maintained by `mmalloc'.
2 Copyright 1990, 1991, 1992 Free Software Foundation
4 Written May 1989 by Mike Haertel.
5 Modified Mar 1992 by Fred Fish. (fnf@cygnus.com)
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with the GNU C Library; see the file COPYING.LIB. If
19 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 The author may be reached (Email) at the address mike@ai.mit.edu,
23 or (US mail) as Mike Haertel c/o Free Software Foundation. */
25 #include "mmprivate.h"
27 /* FIXME: See the comment in mmprivate.h where struct mstats is defined.
28 None of the internal mmalloc structures should be externally visible
29 outside the library. */
40 (char *) mdp
-> morecore (mdp
, 0) - mdp
-> heapbase
;
41 result
.chunks_used
= mdp
-> heapstats
.chunks_used
;
42 result
.bytes_used
= mdp
-> heapstats
.bytes_used
;
43 result
.chunks_free
= mdp
-> heapstats
.chunks_free
;
44 result
.bytes_free
= mdp
-> heapstats
.bytes_free
;
This page took 0.032874 seconds and 4 git commands to generate.