kernel/vm: Add discard_address_range that discards pages.
Pages in the given range are unmapped and freed without getting written back anywhere. It can be used whenever a caller does not care about the data in the given range anymore and wants to reduce page pressure. Change-Id: I8bcce68fab278efef710d3714677e1d463504a56 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2843 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
4bfc0072e3
commit
8e74e30784
@@ -135,6 +135,8 @@ public:
|
||||
virtual status_t Adopt(VMCache* source, off_t offset, off_t size,
|
||||
off_t newOffset);
|
||||
|
||||
virtual status_t Discard(off_t offset, off_t size);
|
||||
|
||||
status_t FlushAndRemoveAllPages();
|
||||
|
||||
void* UserData() { return fUserData; }
|
||||
|
||||
Reference in New Issue
Block a user