# Page owned by user



## potterv (Nov 25, 2009)

Hello people,

I want of find the number of pages each user has in FreeBSD kernel.
Can anyone help me with this? I know there is no direct link between user and pages but between pages and object. But I am having trouble connecting that to find the user that owns that page.
Help!!


----------



## vivek (Nov 25, 2009)

Are you talking about virtual memory or something else?


----------



## anemos (Nov 25, 2009)

potterv said:
			
		

> ...the user that owns that page.



The process owns the page.

However, if you look at /usr/include/sys/proc.h there is a member in struct proc

```
struct proc {
    ...
    struct ucred *p_ucred; /* (c) Process owner's identity. */
    ...
}
```
which you can use to extract the data you need.


----------



## potterv (Nov 26, 2009)

*Hello*



			
				vivek said:
			
		

> Are you talking about virtual memory or something else?



Yeah..am talking about virtual machine. Can you help?


----------

