Re: can application find out the physical address of it's buffer ?



Andray Kaganovsky <andrayk@xxxxxxxxxxx> wrote:
Hello,

I would appreciate any help regarding the following problem.

I am writing user-space application, and I need to allocate moderately
sized (few KBytes) buffer in such a way that my application knows
which physical address the allocated buffer resides at.

The related question is, how can I lock the allocated buffer in RAM
so that it will not be swapped out when my application exhaust it's
time slice and is scheduled off the CPU, and will still be at
the same physical address when my application will get back on the
CPU.

The mlock() function might be of help here.

--
:wq
^X^Cy^K^X^C^C^C^C
.



Relevant Pages

  • can application find out the physical address of its buffer ?
    ... and I need to allocate moderately ... sized (few KBytes) buffer in such a way that my application knows ... which physical address the allocated buffer resides at. ... time slice and is scheduled off the CPU, ...
    (comp.unix.programmer)
  • can application find out the physical address of its buffer ?
    ... and I need to allocate moderately ... sized (few KBytes) buffer in such a way that my application knows ... which physical address the allocated buffer resides at. ... time slice and is scheduled off the CPU, ...
    (comp.os.linux.embedded)
  • Re: Dynamic Buffer in CTransInPlaceFilter - InputPin
    ... How I can allocate my Inputbuffer in a dynamic way. ... > I now want the variable cbBuffer to vary during the running process. ... You cannot vary the allocated buffer size while running. ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Mainline kernel OLTP performance update
    ... All numbers are in CPU cycles. ... obj size SLAB SLQB SLUB ... alloc/free test (repeatedly allocate and free) ... Unfortunately these are not too realistic tests of remote freeing pattern, ...
    (Linux-Kernel)
  • Re: [RFC PATCH 00/09] robust VM per_cpu variables
    ... memory for potential processors... ... Store away the initial values of per_cpu variables (PCV), ... PCVs are separated per cpu the same as the BTPCV then this will work. ... allocate them when the CPU is loaded, and copy in the saved BTPCV. ...
    (Linux-Kernel)