libmemstat.3 (148359) | libmemstat.3 (148627) |
---|---|
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 148359 2005-07-24 01:41:47Z rwatson $ | 25.\" $FreeBSD: head/lib/libmemstat/libmemstat.3 148627 2005-08-01 19:07:39Z 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_uma "struct memory_type_list *list" "void *kvm_handle" 57.Ft int |
|
56.Fn memstat_sysctl_all "struct memory_type_list *list" "int flags" 57.Ft int 58.Fn memstat_sysctl_malloc "struct memory_type_list *list" "int flags" 59.Ft int 60.Fn memstat_sysctl_uma "struct memory_type_list *list" "int flags" 61.Ss Memory Type Accessor Methods 62.Ft const char * 63.Fn memstat_get_name "const struct memory_type *mtp" --- 76 unchanged lines hidden (view full) --- 140via a 141.Vt struct memory_type_list , 142which will be allocated by calling 143.Fn memstat_mtl_alloc , 144and freed on completion using 145.Fn memstat_mtl_free . 146Lists of memory types are populated via calls that query the kernel for 147statistics information; currently: | 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 64.Ft const char * 65.Fn memstat_get_name "const struct memory_type *mtp" --- 76 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: |
150.Fn memstat_kvm_uma , |
|
148.Fn memstat_sysctl_all , 149.Fn memstat_sysctl_uma , 150and 151.Fn memstat_sysctl_malloc . 152Repeated calls will incrementally update the list of memory types, permitting 153tracking over time without recreating all list state. 154If an error is detected during a query call, error condition information may 155be retrieved using --- 282 unchanged lines hidden (view full) --- 438library appeared in 439.Fx 6.0 . 440.Sh AUTHORS 441The kernel memory allocator changes necessary to support a general purpose 442monitoring library, along with the library, were written by 443.An Robert Watson Aq rwatson@FreeBSD.org 444.Sh BUGS 445.Nm | 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 158be retrieved using --- 282 unchanged lines hidden (view full) --- 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 448.Nm |
446cannot yet extract statistics from kernel core dumps, although this should be 447straight forward to implement. | 449cannot yet extract 450.Xr malloc 9 451statistics from kernel core dumps, although this should be straight forward 452to implement. |
448.Pp 449Once a memory type is present on a memory type list, it will not be removed 450even if the kernel no longer presents information on the type via its 451monitoring interfaces. 452In order to flush removed memory types, it is necessary to free the entire 453list and allocate a new one. | 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. |