1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24
25#ifndef	_MEMORY_H
26#define	_MEMORY_H
27
28#ifdef	__cplusplus
29extern "C" {
30#endif
31
32int page_walk_init(mdb_walk_state_t *);
33int page_walk_step(mdb_walk_state_t *);
34void page_walk_fini(mdb_walk_state_t *);
35int page(uintptr_t, uint_t, int, const mdb_arg_t *);
36int allpages_walk_init(mdb_walk_state_t *);
37int allpages_walk_step(mdb_walk_state_t *);
38void allpages_walk_fini(mdb_walk_state_t *);
39int memstat(uintptr_t, uint_t, int, const mdb_arg_t *);
40
41int pagelookup(uintptr_t, uint_t, int, const mdb_arg_t *);
42void pagelookup_help(void);
43int page_num2pp(uintptr_t, uint_t, int, const mdb_arg_t *);
44
45int seg_walk_init(mdb_walk_state_t *);
46int seg(uintptr_t, uint_t, int, const mdb_arg_t *);
47
48#define	SEGVN_PAGES_RESIDENT	(void *)(uintptr_t)0
49#define	SEGVN_PAGES_ALL		(void *)(uintptr_t)1
50int segvn_pages_walk_init(mdb_walk_state_t *);
51int segvn_pages_walk_step(mdb_walk_state_t *);
52void segvn_pages_walk_fini(mdb_walk_state_t *);
53
54int vnode2smap(uintptr_t, uint_t, int, const mdb_arg_t *);
55int addr2smap(uintptr_t, uint_t, int, const mdb_arg_t *);
56
57#define	ANON_WALK_ALLOC	(void *)(uintptr_t)0
58#define	ANON_WALK_ALL	(void *)(uintptr_t)1
59int anon_walk_init(mdb_walk_state_t *);
60int segvn_anon_walk_init(mdb_walk_state_t *);
61int anon_walk_step(mdb_walk_state_t *);
62void anon_walk_fini(mdb_walk_state_t *);
63int pmap(uintptr_t, uint_t, int, const mdb_arg_t *);
64
65int swap_walk_init(mdb_walk_state_t *);
66int swap_walk_step(mdb_walk_state_t *);
67int swapinfof(uintptr_t, uint_t, int, const mdb_arg_t *);
68
69int memlist_walk_step(mdb_walk_state_t *);
70int memlist(uintptr_t, uint_t, int, const mdb_arg_t *);
71
72#ifdef	__cplusplus
73}
74#endif
75
76#endif	/* _MEMORY_H */
77