According to C11 N1570 standard draft:
7.24.2.2 "The memmove
function":
The
memmove
function copiesn
characters from the object pointed to bys2
into the object pointed to bys1
. Copying takes place as if then
characters from the object pointed to bys2
are first copied into a temporary array ofn
characters that does not overlap the objects pointed to bys1
ands2
, and then then
characters from the temporary array are copied into the object pointed to bys1
So if I choose to move a buffer of size 32K using (file_size = 32K)
memmove(io_Buffer, io_Buffer+17, file_size);
won't the temp buffer be of size 32K?
Question
Can the program allocate dynamic memory on its own? Does it allocate and free the memory in that one line?