Re: user malloc from kernel

2003-09-30 Thread Peter Pentchev
On Mon, Sep 29, 2003 at 05:04:05PM -0700, Brian O'Shea wrote: > --- Peter Pentchev <[EMAIL PROTECTED]> wrote: [actually, Pawel wrote this:] > > > Here you got sample kernel module which do this: > > > > > > http://garage.freebsd.pl/usmalloc.tgz > > > http://garage.freebsd.pl/usmalloc.README [a

Re: user malloc from kernel

2003-09-30 Thread Terry Lambert
Pawel Jakub Dawidek wrote: > On Mon, Sep 29, 2003 at 06:56:13PM +0300, Peter Pentchev wrote: > +> I mean, won't the application's memory manager attempt to allocate the > +> next chunk of memory right over the region that you have stolen with > +> this brk(2) invocation? Thus, when the application

Re: user malloc from kernel

2003-09-30 Thread Terry Lambert
earthman wrote: > how to allocate some memory chunk > in user space memory from kernel code? > how to do it correctly? If your intent is to allocate a chunk of memory which is shared between your kernel and a single process in user space, the normal way of doing this is to allocate the memory to a

Re: user malloc from kernel

2003-09-29 Thread Brian O'Shea
--- Peter Pentchev <[EMAIL PROTECTED]> wrote: > > Here you got sample kernel module which do this: > > > > http://garage.freebsd.pl/usmalloc.tgz > > http://garage.freebsd.pl/usmalloc.README > > E... but won't this interfere *badly* with userland programs > which attempt to allocate me

Re: user malloc from kernel

2003-09-29 Thread Pawel Jakub Dawidek
On Mon, Sep 29, 2003 at 06:56:13PM +0300, Peter Pentchev wrote: +> I mean, won't the application's memory manager attempt to allocate the +> next chunk of memory right over the region that you have stolen with +> this brk(2) invocation? Thus, when the application tries to write into +> its newly-a

Re: user malloc from kernel

2003-09-29 Thread Peter Pentchev
On Mon, Sep 29, 2003 at 05:47:41PM +0200, Pawel Jakub Dawidek wrote: > On Mon, Sep 29, 2003 at 05:22:47PM +0300, earthman wrote: > +> how to allocate some memory chunk > +> in user space memory from kernel code? > +> how to do it correctly? > > Here you got sample kernel module which do this: > >

Re: user malloc from kernel

2003-09-29 Thread Pawel Jakub Dawidek
On Mon, Sep 29, 2003 at 05:22:47PM +0300, earthman wrote: +> how to allocate some memory chunk +> in user space memory from kernel code? +> how to do it correctly? Here you got sample kernel module which do this: http://garage.freebsd.pl/usmalloc.tgz http://garage.freebsd.pl/usmal

Re: user malloc from kernel

2003-09-29 Thread Poul-Henning Kamp
In message <[EMAIL PROTECTED]>, earthman writes: >hi > > >how to allocate some memory chunk >in user space memory from kernel code? >how to do it correctly? You shouldn't and it would be very trick to do right if at all. Try to tell us what you're trying to do and maybe we can find a better way t

user malloc from kernel

2003-09-29 Thread earthman
hi how to allocate some memory chunk in user space memory from kernel code? how to do it correctly? -- Best regards, earthmanmailto:[EMAIL PROTECTED] icq: 145680330 ___ [EMAIL PROTEC