I’d like to copy a lot of data from volatile memory.
memcpy()
can read several times, different data sizes and all, which doesn’t matter in my case since the memory is safe once I call memcpy()
.
The only problem could be memcpy()
doesn’t copy the n
bytes I instructed it to copy due to optimization.
Is it possible, or does memcpy()
(gcc) guarantee n
bytes are copied (again, no matter how many reads and their sizes)?
I’d like to avoid writing this myself since memcpy()
‘s gcc implementation must be faster (n
being a constant), and src
and dst
are both RAM, not IO.
1