Find the answer to your Linux question:
Results 1 to 3 of 3
I want to know if there is a non-blocking memcpy? I have a program that delivers 2MB of data into a chunk of memory every ~7 ms. I need to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    51

    Question Is there a non-blocking memcpy i.e. "software DMA"?


    I want to know if there is a non-blocking memcpy? I have a program that delivers 2MB of data into a chunk of memory every ~7 ms. I need to copy that data out into a larger circular buffer. If I could not call memcpy and use a non-blocking "software DMA", that would greatly increase my though-put.

  2. #2
    Just Joined!
    Join Date
    Jun 2011
    Location
    Belgium
    Posts
    84
    As far as I know, DMA can only be used with I/O (not sure, sorry if I'm wrong).

    You may try with a file-socket as workaround (fork a new process and write/read to/from that socket in O_NONBLOKING mode). I'm not sure it meet your (performance) needs and there is a lot of development.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,633
    What do mean specifically by blocking/non-blocking? Those terms have a lot of nuances, depending upon the situation and environment. I think I understand your main problem - to move large chunks of data from one location in memory to another quickly and without interfering with system operation. So, do you mean non-blocking of other processes attempting to access memory, other threads in the same process that may want to access the same buffers, or something else?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •