Re: MALLOC

From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 05/30/04


Date: Sun, 30 May 2004 19:23:03 -0400

At this point you are into writing a device driver. There is no way to talk to the card
without one, unless you want to be stuck on end-of-lifetime MS-DOS boxes and not be able
to run on 2000, XP, Server 2003 or Longhorn.

This also makes it nearly impossible to use 1GB of RAM, because that 1GB has to be
physically "locked down" during the DMA transfer, requiring the end user to have a MINIMUM
of about 2GB of RAM.

"A whole lot of audio data"? I've got one client doing realtime FFT transforms and
buffering using only 128K buffers, (64K each channel, CD-audio quality, 44.1K samples per
second) with glitch-free audio, so it is not at all clear why you would need 1.5GB of
audio RAM "for performance issues". In fact, this is almost certainly guaranteed to worsen
any performance, because of the amount of paging traffic it could generate unless the user
has the aforementioned 2GB of RAM.

How many samples per second, of what size, do you need to record? The solution space you
can work in is HUGE, including things like asynchronous I/O, I/O Completion Ports,
queueing models, double-buffering (aforementioned app had incredibly complex quad
buffering; he ripped the code out and reduced it to double buffering and didn't lose
anything except complexity), and a lot of other techniques you can bring to bear.
                                        joe

On Sat, 29 May 2004 22:21:04 -0700, "VIJAY" <anonymous@discussions.microsoft.com> wrote:

>hello sir,
>plz have patience to read this looooong mail.
>i need to design a high speed recording system.
>the pci card has a plx chip which provides dma facilty for data transfer.
>for dma i need the source address and the destination address....
>i have input audio files (.wav files) i need to read the data from the files and store the audio data in an buffer.
>buffer is malloc(sizeof(audio File)) or virtualalloc(...)
>
>then i give this buffer[0] as the start address for dma transfer.and the destination address as the plx register offset which is mapped to a FIFO.from FIFO output goes to analog output where data is recorded.
>
>Now the question is i need the whole of audio data in RAM.
>due to performance issues.. i cant fetch from hard disk and start transfer.
>i need data in memory and start transfer... will it hold data upto 1.5GB in RAM ...?
>any suggestion is apprecieated..

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm



Relevant Pages

  • Re: running Linux with no swap space (but lots of RAM)
    ... The buffering logic ... | into memory. ... Reading is does not create the same situation as writing out. ... By that time a huge amount of RAM is ...
    (comp.os.linux.development.system)
  • Re: disk or RAM
    ... run a benchmark to prove the mettle of his machine, ... an "old timer" might tell you the buffer in RAM is simply a multiple of the record blocking of the data file which is largely determined by the track/sector mapping of the particular disk. ... If the file was read sequentially it was necessary to provide enough buffering that the disk read could stay a block or two ahead of the sequential read through the buffer in RAM - most times 3-4 blocks worth of buffering was enough for each file being processed sequantially. ...
    (comp.lang.java.help)
  • Re: Memory Stick Life Span
    ... > files in a single directory, reads ... > and writes can become extremely slow if unlike Windows, real RAM ... > isn't used for directory buffering. ... Fragmentation exists in both disk and solid state memory, ...
    (rec.photo.digital)
  • Re: Memory Stick Life Span
    ... RAM shouldn't, except for one thing. ... If a camera stores too many ... files in a single directory, reads ... isn't used for directory buffering. ...
    (rec.photo.digital)
  • Re: circumventing rights protection on DVD?
    ... copy in RAM, which requires authorisation. ... Requires making a transient copy of the video and audio data to RAM in ...
    (uk.legal)

Loading