memmove
Replacing a substring with another string in C
I am writing a code to replace all MACROS with its value. If my macro MAX has a value 1000, And in the code, it must be replaced with 1000.(I am assuming a case that if the MACROS are the first word i[详细]
2023-03-31 20:18 分类:问答Valgrind says "Source and destination overlap in memcpy" about two buffers but they seems to not overlap
LAST EDIT in the end of OP I tested with Valgrind a function used in a project and it says \"Source and destination overlap in memcpy\" and gives me also \"Invalid read\" and \"Invalid write\" errors[详细]
2023-03-12 10:31 分类:问答Does memmove actually "move" a chunk of memory and leave behind zeros at the source? [duplicate]
This question already has answers here: Closed 11 years 开发者_开发技巧ago. Possible Duplicate: memcpy vs memmove[详细]
2023-03-02 20:39 分类:问答copy character string to an unsigned buffer: Segmentation fault
i am trying to copy two integers and a character string to a buffer and print the buffer elements out. I get a seg fault for the third printf statement:[详细]
2023-03-01 17:34 分类:问答memcpy vs assignment in C -- should be memmove?
As pointed out in an answer to this question, the compiler (in this case gcc-4.1.2, yes it\'s old, no I can\'t change it) can replace struct assignments with memcpy where it thinks it is appropriate.[详细]
2023-02-19 03:06 分类:问答memmove implementation
In reference to the thread: memmove implementation in C, I did not understand why would there be a memory overlap for 2 different variables? i.e. is this a normal scenario that the compiler allocates[详细]
2023-02-11 23:17 分类:问答memcpy() vs memmove()
I am trying to understand the difference between memcpy() and memmove(), and I have read the text that memcpy() doesn\'t take care of the overlapping source and destination whereas memmove() does.[详细]
2023-01-29 20:08 分类:问答Strange behavior of memcpy/memmove
I have the problem that memcpy/memmove change the pointer of a struct FOO foo, which is neither src nor destination of the function. Here are the gdb outputs:[详细]
2023-01-17 13:58 分类:问答What are real significant cases when memcpy() is faster than memmove()?
The key difference b开发者_如何学编程etween memcpy() and memmove() is that memmove() will work fine when source and destination overlap. When buffers surely don\'t overlap memcpy() is preferable since[详细]
2023-01-16 11:22 分类:问答Fast memmove for x86 and +1 shift (for Move-to-front transform)
For fast MTF ( http://en.wikipedia.org/wiki/Move-to-front_transform ) i need faster version of moving a char from inside the array into the front of it:[详细]
2023-01-15 22:46 分类:问答