As far as I know, the CPU does not / cannot perform DMA on its own. Therefore, you need external equipment on the bus to do the trick for you.
However, most hardware cannot address all physical memory, so an exact memcpy clone is not possible unless you have very strict definitions of ranges of memory addresses in your use case. Otherwise, the kernel would have to memcpy block its own memory block, which would kill the memcpy clone target first :)
But if you want to create a βcloneβ of the memory block without using memcpy (still a bad idea, since access to DMA memory is usually slower than that of the processor), you can send the memory block to the video card and return it to another buffer. You can even place the block in the video memory (putbitmap ()? :)) and perform hardware acceleration bitblt () to create a copy on the fly.
Do you mind sharing your actual goal so that maybe people can come up with smart / better tricks?
Sedat kapanoglu
source share