Deleted Added
full compact
memstat_uma.c (148071) memstat_uma.c (148170)
1/*-
2 * Copyright (c) 2005 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2005 Robert N. M. Watson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/lib/libmemstat/memstat_uma.c 148071 2005-07-15 23:39:21Z rwatson $
26 * $FreeBSD: head/lib/libmemstat/memstat_uma.c 148170 2005-07-20 09:17:40Z rwatson $
27 */
28
29#include <sys/param.h>
30#include <sys/sysctl.h>
31
32#include <vm/uma.h>
33
34#include <err.h>

--- 182 unchanged lines hidden (view full) ---

217 mtp->mt_size = uthp->uth_size;
218 mtp->mt_memalloced = mtp->mt_numallocs * uthp->uth_size;
219 mtp->mt_memfreed = mtp->mt_numfrees * uthp->uth_size;
220 mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed;
221 mtp->mt_countlimit = uthp->uth_limit;
222 mtp->mt_byteslimit = uthp->uth_limit * uthp->uth_size;
223
224 mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees;
27 */
28
29#include <sys/param.h>
30#include <sys/sysctl.h>
31
32#include <vm/uma.h>
33
34#include <err.h>

--- 182 unchanged lines hidden (view full) ---

217 mtp->mt_size = uthp->uth_size;
218 mtp->mt_memalloced = mtp->mt_numallocs * uthp->uth_size;
219 mtp->mt_memfreed = mtp->mt_numfrees * uthp->uth_size;
220 mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed;
221 mtp->mt_countlimit = uthp->uth_limit;
222 mtp->mt_byteslimit = uthp->uth_limit * uthp->uth_size;
223
224 mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees;
225 mtp->mt_zonefree = uthp->uth_zone_free + uthp->uth_keg_free;
225 mtp->mt_zonefree = uthp->uth_zone_free;
226 mtp->mt_kegfree = uthp->uth_keg_free;
226 mtp->mt_free += mtp->mt_zonefree;
227 }
228
229 free(buffer);
230
231 return (0);
232}
227 mtp->mt_free += mtp->mt_zonefree;
228 }
229
230 free(buffer);
231
232 return (0);
233}