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



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.

Any advice is greatly appreciated.

Thanks and regards,
Andray
.



Relevant Pages

  • [PATCH] cpm_uart: Fix dpram allocation and non-console uarts
    ... Makes non-console UART work on both 8xx and 82xx ... static unsigned int cpm_uart_tx_empty(struct uart_port *port) ... /* Write back buffer pointer */ ... * Allocate DP-Ram and memory buffers. ...
    (Linux-Kernel)
  • Re: Access violation with heap memory
    ... I'm getting a runtime access violation using heap memory that was ... Now, when I try to access the buffer in the main function, I ... Why are you using 'char'? ... Note that there is no need to allocate storage until you are in the FillBuf, ...
    (microsoft.public.vc.mfc)
  • Re: [PATCH 0/3]HTLB mapping for drivers (take 2)
    ... It sounds like this patch set working towards the same goal as my ... so the buffer is in normal memory. ... is responsible for populating a buffer for sending to a device. ... Allocate memory. ...
    (Linux-Kernel)
  • Re: [RFC v2][PATCH 2/9] General infrastructure for checkpoint restart
    ... kmalloc a temporary buffer and flush immediately. ... Only after the container resumes ... (This is also useful in case you want to keep the checkpoint image entirely ... provides a shortcut to allocate space directly on the buffer, ...
    (Linux-Kernel)
  • Re: perfmon2 vector argument question
    ... into a kernel buffer. ... the vector must be copied into a kernel-level buffer. ... because kmalloc/kfree are expensive. ... Another approach that was suggested to me is to allocate on demand but not kfree ...
    (Linux-Kernel)