user malloc from kernel
Brian O'Shea
b_oshea at yahoo.com
Mon Sep 29 17:04:07 PDT 2003
--- Peter Pentchev <roam at ringlet.net> wrote:
> > Here you got sample kernel module which do this:
> >
> > http://garage.freebsd.pl/usmalloc.tgz
> > http://garage.freebsd.pl/usmalloc.README
>
> Errrr... but won't this interfere *badly* with userland programs
> which attempt to allocate memory after making the syscall in question?
Couldn't the user library interface to this new system call just
malloc() the memory first in the process, and then pass the pointer
and size to the kernel via the system call interface? This would
ensure that malloc() doesn't touch the desired range of memory until
it is freed by the user. You'd just have to be careful not to free
it until the kernel is done with it.
-brian
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the freebsd-hackers
mailing list