Hi,
memcpy() from mmap buffer has very poor performance. You can do benchmarks but you will finally come to the conclusion that this just does not work in real time applications. I have tried same implementations also.
What you want is "zero copy" e.g exporting file descriptor of DMA V4L2 Buffer as described here (especially slide 15):
https://elinux.org/images/5/53/Zero-copy_video_streaming.pdf
Also it depends what you want to do with the buffer. Gstreamer application could be a good choice. In Gstreamer you can use "appsink" to fetch buffers. In general, zero copy is quite a complex task. gstreamer hides all that complexity from you.