Deleted Added
full compact
procfs_map.c (41514) procfs_map.c (42957)
1/*
2 * Copyright (c) 1993 Jan-Simon Pendry
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

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

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94
38 *
1/*
2 * Copyright (c) 1993 Jan-Simon Pendry
3 * Copyright (c) 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Jan-Simon Pendry.
8 *

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

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94
38 *
39 * $Id: procfs_map.c,v 1.17 1998/04/29 04:28:22 dyson Exp $
39 * $Id: procfs_map.c,v 1.18 1998/12/04 22:54:51 archie Exp $
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/proc.h>
45#include <sys/vnode.h>
46#include <miscfs/procfs/procfs.h>
47

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

88
89 error = 0;
90 if (map != &curproc->p_vmspace->vm_map)
91 vm_map_lock_read(map);
92 for (entry = map->header.next;
93 ((uio->uio_resid > 0) && (entry != &map->header));
94 entry = entry->next) {
95 vm_object_t obj, tobj, lobj;
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/proc.h>
45#include <sys/vnode.h>
46#include <miscfs/procfs/procfs.h>
47

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

88
89 error = 0;
90 if (map != &curproc->p_vmspace->vm_map)
91 vm_map_lock_read(map);
92 for (entry = map->header.next;
93 ((uio->uio_resid > 0) && (entry != &map->header));
94 entry = entry->next) {
95 vm_object_t obj, tobj, lobj;
96 int ref_count, shadow_count, id, flags;
96 int ref_count, shadow_count, flags;
97 vm_offset_t addr;
98 int resident, privateresident;
99 char *type;
100
101 if (entry->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP))
102 continue;
103
104 obj = entry->object.vm_object;

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

134case OBJT_DEVICE:
135 type = "device";
136 break;
137 }
138
139 flags = obj->flags;
140 ref_count = obj->ref_count;
141 shadow_count = obj->shadow_count;
97 vm_offset_t addr;
98 int resident, privateresident;
99 char *type;
100
101 if (entry->eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP))
102 continue;
103
104 obj = entry->object.vm_object;

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

134case OBJT_DEVICE:
135 type = "device";
136 break;
137 }
138
139 flags = obj->flags;
140 ref_count = obj->ref_count;
141 shadow_count = obj->shadow_count;
142 id = obj->id;
143 } else {
144 type = "none";
145 flags = 0;
146 ref_count = 0;
147 shadow_count = 0;
142 } else {
143 type = "none";
144 flags = 0;
145 ref_count = 0;
146 shadow_count = 0;
148 id = 0;
149 }
150
151
152 /*
153 * format:
154 * start, end, resident, private resident, cow, access, type.
155 */
156 snprintf(mebuffer, sizeof(mebuffer),
147 }
148
149
150 /*
151 * format:
152 * start, end, resident, private resident, cow, access, type.
153 */
154 snprintf(mebuffer, sizeof(mebuffer),
157 "0x%x 0x%x %d %d %d %s%s%s %d %d 0x%x %s %s %s\n",
155 "0x%x 0x%x %d %d %p %s%s%s %d %d 0x%x %s %s %s\n",
158 entry->start, entry->end,
156 entry->start, entry->end,
159 resident, privateresident, id,
157 resident, privateresident, obj,
160 (entry->protection & VM_PROT_READ)?"r":"-",
161 (entry->protection & VM_PROT_WRITE)?"w":"-",
162 (entry->protection & VM_PROT_EXECUTE)?"x":"-",
163 ref_count, shadow_count, flags,
164 (entry->eflags & MAP_ENTRY_COW)?"COW":"NCOW",
165 (entry->eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC",
166 type);
167

--- 20 unchanged lines hidden ---
158 (entry->protection & VM_PROT_READ)?"r":"-",
159 (entry->protection & VM_PROT_WRITE)?"w":"-",
160 (entry->protection & VM_PROT_EXECUTE)?"x":"-",
161 ref_count, shadow_count, flags,
162 (entry->eflags & MAP_ENTRY_COW)?"COW":"NCOW",
163 (entry->eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC",
164 type);
165

--- 20 unchanged lines hidden ---