Deleted Added
full compact
libmemstat.3 (148627) libmemstat.3 (148789)
1.\" Copyright (c) 2005 Robert N. M. Watson
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

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

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

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

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/lib/libmemstat/libmemstat.3 148627 2005-08-01 19:07:39Z rwatson $
25.\" $FreeBSD: head/lib/libmemstat/libmemstat.3 148789 2005-08-06 13:54:03Z rwatson $
26.\"
27.Dd June 27, 2005
28.Os
29.Dt LIBMEMSTAT 3
30.Sh NAME
31.Nm libmemstat
32.Nd "library interface to retrieve kernel memory allocator statistics"
33.Sh LIBRARY

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

48.Ft struct memory_type *
49.Fn memstat_mtl_find "struct memory_type_list *list" "int allocator" "const char *name"
50.Ft void
51.Fn memstat_mtl_free "struct memory_type_list *list"
52.Ft int
53.Fn memstat_mtl_geterror "struct memory_type_list *list"
54.Ss Allocator Query Functions
55.Ft int
26.\"
27.Dd June 27, 2005
28.Os
29.Dt LIBMEMSTAT 3
30.Sh NAME
31.Nm libmemstat
32.Nd "library interface to retrieve kernel memory allocator statistics"
33.Sh LIBRARY

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

48.Ft struct memory_type *
49.Fn memstat_mtl_find "struct memory_type_list *list" "int allocator" "const char *name"
50.Ft void
51.Fn memstat_mtl_free "struct memory_type_list *list"
52.Ft int
53.Fn memstat_mtl_geterror "struct memory_type_list *list"
54.Ss Allocator Query Functions
55.Ft int
56.Fn memstat_kvm_all "struct memory_type_list *list" "void *kvm_handle"
57.Ft int
58.Fn memstat_kvm_malloc "struct memory_type_list *list" "void *kvm_handle"
59.Ft int
56.Fn memstat_kvm_uma "struct memory_type_list *list" "void *kvm_handle"
57.Ft int
58.Fn memstat_sysctl_all "struct memory_type_list *list" "int flags"
59.Ft int
60.Fn memstat_sysctl_malloc "struct memory_type_list *list" "int flags"
61.Ft int
62.Fn memstat_sysctl_uma "struct memory_type_list *list" "int flags"
63.Ss Memory Type Accessor Methods

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

142via a
143.Vt struct memory_type_list ,
144which will be allocated by calling
145.Fn memstat_mtl_alloc ,
146and freed on completion using
147.Fn memstat_mtl_free .
148Lists of memory types are populated via calls that query the kernel for
149statistics information; currently:
60.Fn memstat_kvm_uma "struct memory_type_list *list" "void *kvm_handle"
61.Ft int
62.Fn memstat_sysctl_all "struct memory_type_list *list" "int flags"
63.Ft int
64.Fn memstat_sysctl_malloc "struct memory_type_list *list" "int flags"
65.Ft int
66.Fn memstat_sysctl_uma "struct memory_type_list *list" "int flags"
67.Ss Memory Type Accessor Methods

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

146via a
147.Vt struct memory_type_list ,
148which will be allocated by calling
149.Fn memstat_mtl_alloc ,
150and freed on completion using
151.Fn memstat_mtl_free .
152Lists of memory types are populated via calls that query the kernel for
153statistics information; currently:
154.Fn memstat_kvm_all ,
155.Fn memstat_kvm_malloc ,
150.Fn memstat_kvm_uma ,
151.Fn memstat_sysctl_all ,
152.Fn memstat_sysctl_uma ,
153and
154.Fn memstat_sysctl_malloc .
155Repeated calls will incrementally update the list of memory types, permitting
156tracking over time without recreating all list state.
157If an error is detected during a query call, error condition information may

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

440.Nm libmemstat
441library appeared in
442.Fx 6.0 .
443.Sh AUTHORS
444The kernel memory allocator changes necessary to support a general purpose
445monitoring library, along with the library, were written by
446.An Robert Watson Aq rwatson@FreeBSD.org
447.Sh BUGS
156.Fn memstat_kvm_uma ,
157.Fn memstat_sysctl_all ,
158.Fn memstat_sysctl_uma ,
159and
160.Fn memstat_sysctl_malloc .
161Repeated calls will incrementally update the list of memory types, permitting
162tracking over time without recreating all list state.
163If an error is detected during a query call, error condition information may

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

446.Nm libmemstat
447library appeared in
448.Fx 6.0 .
449.Sh AUTHORS
450The kernel memory allocator changes necessary to support a general purpose
451monitoring library, along with the library, were written by
452.An Robert Watson Aq rwatson@FreeBSD.org
453.Sh BUGS
448.Nm
449cannot yet extract
450.Xr malloc 9
451statistics from kernel core dumps, although this should be straight forward
452to implement.
454There are memory allocators in the kernel, such as the VM page allocator
455and sf_buf allocator, which are not currently supported by
456.Nm.
453.Pp
454Once a memory type is present on a memory type list, it will not be removed
455even if the kernel no longer presents information on the type via its
456monitoring interfaces.
457In order to flush removed memory types, it is necessary to free the entire
458list and allocate a new one.
457.Pp
458Once a memory type is present on a memory type list, it will not be removed
459even if the kernel no longer presents information on the type via its
460monitoring interfaces.
461In order to flush removed memory types, it is necessary to free the entire
462list and allocate a new one.