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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to