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 ...
- 08-12-2011 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 48
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.
- 08-13-2011 #2Just Joined!
- Join Date
- Jun 2011
- Posts
- 30
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.
- 08-28-2011 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
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!


Reply With Quote