mremap keeps the same virtual pages for the old/new mappings. So
explicitly copying from the old mapping is not needed, and probably
buggy, since the old mapping might have been unmapped.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (new_arena == arena->p)
return;
if (new_arena == arena->p)
return;
- memcpy(new_arena, arena->p, arena->len);
bzero(new_arena + arena->len, len - arena->len);
arena->p = new_arena;
}
bzero(new_arena + arena->len, len - arena->len);
arena->p = new_arena;
}