liveBook · Manning

Memmove

memmove is a C standard-library function that copies a specified number of bytes between memory regions while correctly handling overlap.

How 2 Manning books explain it

Modern C

memmove is a C standard library function that copies bytes between memory regions while permitting the regions to overlap.

How it is used
Handles overlapping memory rearrangement, especially while relocating chunks during circular-buffer resizing.
How deep it goes
Explains the overlap rule and demonstrates selection against memcpy, but defers the function's implementation internals.
Examples
Uses a wrapped circular-buffer chunk moved upward with memmove after reallocating storage.
What you can do after
Apply it via the C standard library when source and destination memory regions may overlap.

Read how Modern C explains memmove →

Modern C, Third Edition

memmove is a C standard-library function that copies bytes between memory regions while correctly handling overlap between the regions.

How it is used
Handles overlapping byte shifts while resizing and rearranging a circular buffer.
How deep it goes
Distinguishes memmove from memcpy through a worked buffer-resize case, without detailing either function’s internal algorithm.
Examples
Uses an upper circular-buffer chunk moved toward a new allocation end with memmove.
What you can do after
Apply via the C standard library when source and destination ranges may overlap.

Read how Modern C, Third Edition explains memmove →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.