Re: user malloc from kernel

From: Brian O'Shea (b_oshea_at_yahoo.com)
Date: 09/30/03

  • Next message: Sergey Babkin: "Re: has anyone installed 5.1 from a SCSI CD?"
    Date: Mon, 29 Sep 2003 17:04:05 -0700 (PDT)
    To: Peter Pentchev <roam@ringlet.net>, Pawel Jakub Dawidek <nick@garage.freebsd.pl>
    
    

    --- 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
    _______________________________________________
    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"


  • Next message: Sergey Babkin: "Re: has anyone installed 5.1 from a SCSI CD?"

    Relevant Pages

    • Thank You -- Thomas J. Gritzan
      ... Thomas -- Your suggestion to malloc() out a block of memory was the ... Below are some details of my memory issues ... ... As a work around solution I guessed a ram disk would solve the ... persistence will frustrate the off topic police and give them a target ...
      (comp.lang.c)
    • Re: Simple question about headers and malloc!
      ... Therefore I am making all of its declarations ... memory (using malloc) and then exit back to main. ... allocation, I get data strored from the second allocation... ...
      (microsoft.public.vc.language)
    • Re: ten thousand small processes
      ... Stack needs to be executable for the current signal trampoline ... the use of malloc() that is causing your primary ... if there is any heap memory in use at all, no matter what you do, ... either directly, as a 4M page mapping (not used for user processes, ...
      (freebsd-performance)
    • Re: Help with Enter and Leave Instructions
      ... >>> for Memory Accesses, ... > The only standard way to do it is via malloc. ... Uh, SBRK/BRK is a standard, documented system call. ... > I really don't understand the objection to using C libraries. ...
      (alt.lang.asm)
    • Re: virtual memory leak? (was: Re: strange problem.....)
      ... and after some time I break this connection. ... executable in heap analyser and still there are no traces of memory ... The debugger is exceedingly programmable, too, ... I'm not a particular fan of malloc and free, ...
      (comp.os.vms)