diff options
-rw-r--r-- | magic_buddy/magic_buddy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/magic_buddy/magic_buddy.c b/magic_buddy/magic_buddy.c index 3b005d0..e4942ee 100644 --- a/magic_buddy/magic_buddy.c +++ b/magic_buddy/magic_buddy.c @@ -314,7 +314,7 @@ int shrink_buddy(size_t new_size, struct buddy *state) { void move_buddy(struct buddy *new_state, struct buddy *old_state) { if (new_state == old_state) return; - memcpy(new_state, old_state, sizeof(struct buddy)); + memmove(new_state, old_state, sizeof(struct buddy)); for (size_t i = 0; i < ADDRESS_BITS; i++) { if (!new_state->avail[i]) continue; new_state->avail[i]->pprev = &(new_state->avail[i]); |