Skip to content
Commit e1e10347 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

restorer: rework unmaping old VMA-s (v3)



All process VMA-s are in "premmaped area". All restorer stuff are in
bootstap "area", so we have two areas.

So we don't need to unmap extra VMA-s one by one. We can call munmap
three times for the region before the first area, for the hole between
areas and for the region after the second area.

The old scheme didn't work, because the list of VMA-s can be changed
after collecting. It can be due to memory allocations by libc or due to
increased stack.

v2: improve readability at the expense of beautiness
v3: print return code of munmap in error messages
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent c900bf74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment