Top "Memcpy" questions

memcpy() is a C standard library function used for copying a block of memory bytes from one place to another.

C Programming. How to deep copy a struct?

I have the following two structs where "child struct" has a "rusage struct" as an element. Then I create two …

c struct memcpy deep-copy
memcpy and pointers

I am confuse on how to read the pointers copied in an array using memcpy. Following is what I have …

c memcpy
Copy a std::vector to a repeated field from protobuf with memcpy

At first I have this simple protobuf file message messagetest { ... repeated float samples = 6; .... } Which creates a headerfile with this methods //…

c++ protocol-buffers memcpy
trying to copy struct members to byte array in c

I am attempting to copy the members of a struct containing a mixture of ints, char's and arrays of chars …

c arrays serialization struct memcpy
Why does the speed of memcpy() drop dramatically every 4KB?

I tested the speed of memcpy() noticing the speed drops dramatically at i*4KB. The result is as follow: the …

performance memory malloc memcpy cpu-cache
How to memcpy a part of a two dimensional array in C?

How to memcpy the two dimensional array in C: I have a two dimensional array: int a[100][100]; int c[10][10]; I …

c arrays memcpy
Is it guaranteed to be safe to perform memcpy(0,0,0)?

I am not so well-versed in the C standard, so please bear with me. I would like to know if …

c memcpy language-lawyer null-pointer
How does the internal implementation of memcpy work?

How does the standard C function 'memcpy' work? It has to copy a (large) chunk of RAM to another area …

c memory copy ram memcpy
C memcpy in reverse

I am working with audio data. I'd like to play the sample file in reverse. The data is stored as …

c reverse memcpy
memcpy vs assignment in C

Under what circumstances should I expect memcpys to outperform assignments on modern INTEL/AMD hardware? I am using GCC 4.2.x …

c struct variable-assignment memcpy