Memory Mapping Multiple Regions

From: Jake (jake_at_hotmail.com)
Date: 10/24/04


Date: Sun, 24 Oct 2004 14:31:39 +0100

Is it possible to memory map more than one area? I have a buffer in a
device driver which I can mmap to. But I would like a second buffer which
is can also be mmap'ed to. The only way I can think of doing it is to use
the ioctl() function to set a flag. This flag will indicate which buffer is
to be mmap'ed. Then when mmap is called the flag is checked and the
necessary action is taken.

Any ideas?



Relevant Pages

  • Re: read vs. mmap (or io vs. page faults)
    ... I think you forgot my earlier explanation regarding buffer ... This could explain, why using mmap is not faster than read, but it does ... your vast knowledge of the internals of the kernel workings ... But because the CPU is underutilized, ...
    (freebsd-current)
  • Re: read vs. mmap (or io vs. page faults)
    ... I think you forgot my earlier explanation regarding buffer ... This could explain, why using mmap is not faster than read, but it does ... your vast knowledge of the internals of the kernel workings ... But because the CPU is underutilized, ...
    (freebsd-questions)
  • Re: [Alsa-devel] Re: [PATCH 2.6.13.1 1/1] CS5535 AUDIO ALSA driver
    ... I thought of creating an API for coherent SG-buffers, ... The question is whether mmap of non-coherent buffer may ...
    (Linux-Kernel)
  • Re: Making existing process efficient
    ... using mmap() instead, with madviseto tell the virtual ... pipe with the child. ... The child would inherit the buffer from ... input buffer to an output buffer and thence to the kernel, ...
    (comp.unix.programmer)
  • Re: Question about memory mapping mechanism
    ... The thing is that I'd like to prevent kernel to swap these pages out, ... the buffer pages, I should increase the referrence of the pages by calling ... Well it wasn't this code in particular, but another driver I was putting ... use the infiniband approach to mmap() the user-space pages and send them ...
    (Linux-Kernel)