4e2b49bc0c
Rename MovePageRange to Adopt and group it with Resize/Rebase as it covers the third, middle cut case. Implement VMAnonymousCache::Adopt() to actually adopt swap pages. This has to recreate swap blocks instead of taking them over from the source cache as the cut offset or base offset between the caches may not be swap block aligned. This means that adoption may fail due to memory shortage in allocating the swap blocks. For the middle cut case it is therefore now possible to have the adopt fail in which case the previous cache restore logic is applied. Since the readoption of the pages from the second cache can fail for the same reason, there is a slight chance that we can't restore and lose pages. For now, just panic in such a case and add a TODO to free memory and retry. Change-Id: I9a661f00c8f03bbbea2fe6dee90371c68d7951e6 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2588 Reviewed-by: waddlesplash <waddlesplash@gmail.com> |
||
---|---|---|
.. | ||
build | ||
compatibility | ||
config | ||
cpp | ||
glibc | ||
libs | ||
os | ||
posix | ||
private | ||
tools |