Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Sep 2003 17:04:05 -0700 (PDT)
From:      Brian O'Shea <b_oshea@yahoo.com>
To:        Peter Pentchev <roam@ringlet.net>, Pawel Jakub Dawidek <nick@garage.freebsd.pl>
Cc:        earthman <earthman@inbox.ru>
Subject:   Re: user malloc from kernel
Message-ID:  <20030930000405.12154.qmail@web10509.mail.yahoo.com>
In-Reply-To: <20030929155613.GB551@straylight.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
--- Peter Pentchev <roam@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030930000405.12154.qmail>