Date: Mon, 22 Jan 2007 12:27:59 +0530 From: "Pranav Sawargaonkar" <pranav.sawargaonkar@gmail.com> To: freebsd-hackers@freebsd.org Subject: Fwd: Creating a "new" virtual address space for a process Message-ID: <5007e1a40701212257m6f6f51b8w6f15040e88a9080e@mail.gmail.com> In-Reply-To: <5007e1a40701212257q37d0c641u5e368464a3068612@mail.gmail.com> References: <45B4308B.7050608@andrew.cmu.edu> <5007e1a40701212257q37d0c641u5e368464a3068612@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
---------- Forwarded message ---------- From: Pranav Sawargaonkar <pranav.sawargaonkar@gmail.com> Date: Jan 22, 2007 12:27 PM Subject: Re: Creating a "new" virtual address space for a process To: Joe Damato <jdamato@andrew.cmu.edu> On 1/22/07, Joe Damato <jdamato@andrew.cmu.edu > wrote: > > Hello - > > >This is my first time posting to the list, so please let me know if I > >should expand on anything I mention here. I am working on the S4OS > >project for FreeBSD with a couple friends and we are currently trying to > >understand how to use the VM system in FreeBSD. > > >We have a process, (in this case it happens to be curproc or proc0), and > >we would like to create a new virtual address space and allocate, say N > >pages starting at address X. To allocate new vmspace and vm_map you can use vmspace_fork() defined in vm/vm_map.c. We have been reading the fork() code to try > >to see how this would work, but got lost in some of the COW stuff. > > >We have some kernel data that needs to be copied out to userland, but we > >can't seem to figure out how to actually set up that virtual address > >space. I would attach a code snippet of the code we wrote to accomplish > >this, but it is literally all guess work, and probably completely wrong. > >Anyone know how to do this or even where to look to see an example of > >this happening? > > >Thanks, > >Joe > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to " freebsd-hackers-unsubscribe@freebsd.org > " >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5007e1a40701212257m6f6f51b8w6f15040e88a9080e>