Subject: Re: direct copy() between two proc address spaces
To: Ian Zagorskih <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 06/19/2004 16:30:35
Content-Type: text/plain; charset=us-ascii
On Sat, Jun 19, 2004 at 06:46:43PM +0700, Ian Zagorskih wrote:
> In short: Inside kernel, is it possibly to directly copy data from addres=
> space of one process to address space of another process ?
> According to man pages there are copyin()/copyout() functions which move =
> from user space to kernel space and back. In my case, i have two processe=
> struct proc *p1 and *p2 and i need to copy some block of data between p1 =
> Of course i can manually allocate temporary buffer inside kernel, copy da=
> buffer from p1, copy data from buffer to p2 and free buffer. But this is=
> quite significant overhead and unneeded operations. Is there some direct =
> to do this ?
Why do you want to do this? Usually this is handled by using either SysV=20
shared memory, or having both processes mmap the same file. Then you have=
userland directly copy fron one place to the other.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
-----END PGP SIGNATURE-----