Deleted Added
full compact
memstat.c (148359) memstat.c (148619)
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.c 148359 2005-07-24 01:41:47Z rwatson $
26 * $FreeBSD: head/lib/libmemstat/memstat.c 148619 2005-08-01 13:18:21Z rwatson $
27 */
28
29#include <sys/param.h>
30#include <sys/sysctl.h>
31
32#include <err.h>
33#include <errno.h>
34#include <stdio.h>

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

83struct memory_type *
84memstat_mtl_next(struct memory_type *mtp)
85{
86
87 return (LIST_NEXT(mtp, mt_list));
88}
89
90void
27 */
28
29#include <sys/param.h>
30#include <sys/sysctl.h>
31
32#include <err.h>
33#include <errno.h>
34#include <stdio.h>

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

83struct memory_type *
84memstat_mtl_next(struct memory_type *mtp)
85{
86
87 return (LIST_NEXT(mtp, mt_list));
88}
89
90void
91memstat_mtl_free(struct memory_type_list *list)
91_memstat_mtl_empty(struct memory_type_list *list)
92{
93 struct memory_type *mtp;
94
95 while ((mtp = LIST_FIRST(&list->mtl_list))) {
96 LIST_REMOVE(mtp, mt_list);
97 free(mtp);
98 }
92{
93 struct memory_type *mtp;
94
95 while ((mtp = LIST_FIRST(&list->mtl_list))) {
96 LIST_REMOVE(mtp, mt_list);
97 free(mtp);
98 }
99}
100
101void
102memstat_mtl_free(struct memory_type_list *list)
103{
104
105 _memstat_mtl_empty(list);
99 free(list);
100}
101
102int
103memstat_mtl_geterror(struct memory_type_list *list)
104{
105
106 return (list->mtl_error);

--- 302 unchanged lines hidden ---
106 free(list);
107}
108
109int
110memstat_mtl_geterror(struct memory_type_list *list)
111{
112
113 return (list->mtl_error);

--- 302 unchanged lines hidden ---