Re: Optimizing a tapped delay (FIR) filter implementation



Kumar Appaiah wrote:


Jani Huhtanen wrote:

Same effect can be achieved by taking advantage of the mmu. Many OSs
allow you to map two pages to same physical address. In the sense of used
physical memory, this is free.

A quick search didn't yield much information. Could you just give me
some pointers on how to do this? Portability isn't much of an issue, so
I would like to learn about this.

BTW, I am on GNU/Linux.

Thanks.

Kumar

Search for 'ring buffer' and 'mmap':
http://www.google.com/search?q=ring+buffer+mmap&ie=UTF-8&oe=UTF-8

One promising result:
http://freshmeat.net/projects/vrb/

And I believe this can be done on any OS that supports some sort of shared
memory. That is, pretty much on every modern OS. I have myself implemented
such ring buffer for linux (or any posix compliant OS) as a C++ class.
However, the code is not in such a shape that I feel comfortable sharing
it. If you have problems with the implementation I can help with the
details.

--
Jani Huhtanen
Tampere University of Technology, Pori
.



Relevant Pages

  • Re: Either a kernel developer or a bit of assistance needed..
    ... Map a specified area of physical memory so that it's accessible ... from the user-space process - doesn't particularly matter where it's ... Just write a driver in the kernel and export the required ...
    (comp.unix.bsd.freebsd.misc)
  • RE: reading data from RAM
    ... To expand upon what Ryan said, one way of accessing physical memory is ... user mode wrapper for the kernel mode function ZwMapViewOfSection(). ... illegal to map a physical address concurrently with 2 different ... leads to greater stability on XP, however some physical pages may not be ...
    (Focus-Microsoft)
  • Either a kernel developer or a bit of assistance needed..
    ... I've a requirement to be able to do the following from a user-space ... Map a specified area of physical memory so that it's accessible ... Allocate buffers, and get pointers to both their physical and ...
    (comp.unix.bsd.freebsd.misc)
  • Re: [MapViewOfFile] How to know the maximum number of bytes to map ?
    ... Available physical memory for system structures used to maintain the ... physical memory if you map a 2GB view of a file. ... bytes to map in the function MapViewOfFile? ... DWORD dwFileOffsetHigh, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: 2.6.17-mm1
    ... On Thu, 22 Jun 2006, Russell King wrote: ... therefore your physical memory address starts at 0. ... because it knew that the map may not start at PFN 0. ... start at PFN 0 even if physical memory does not start until later. ...
    (Linux-Kernel)