Kernel programming
Pranav Sawargaonkar
pranav.sawargaonkar at gmail.com
Sat Jan 14 08:06:53 PST 2006
Hi
I have doubt about accessing vmspace structure using proc pointer.
I have written code below in my module and try to find out data size
of a program, but during make it is giving me errors.Please anyone tell
me what is right way to code my function.
Function I have written is-
static int myfunction(void)
{
struct proc *p;
p=pfind(400); //400 is pid of one of process running at that time
printf("\nData size %d",ctob(p->p_vmspace->vm_dsize));
UNLOCK_PROC(p);
return 0;
}
Thank you.
Pranav
More information about the freebsd-hackers
mailing list