kernel/vm: use DoublyLinkedList for VMCache areas list

Change-Id: I0c6a231f245fa542f5d90959755de1e6ba39eb8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8685
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
X512
2024-12-17 17:53:47 +00:00
committed by waddlesplash
parent 04c90835ac
commit 8ea4167e8b
8 changed files with 47 additions and 54 deletions
+7 -2
View File
@@ -119,8 +119,13 @@ public:
uint8* page_protections;
struct VMAddressSpace* address_space;
struct VMArea* cache_next;
struct VMArea* cache_prev;
private:
DoublyLinkedListLink<VMArea> fCacheLink;
public:
typedef DoublyLinkedList<VMArea,
DoublyLinkedListMemberGetLink<VMArea, &VMArea::fCacheLink> > CacheList;
addr_t Base() const { return fBase; }
size_t Size() const { return fSize; }
+2 -1
View File
@@ -15,6 +15,7 @@
#include <util/DoublyLinkedList.h>
#include <vm/vm.h>
#include <vm/vm_types.h>
#include <vm/VMArea.h>
#include "kernel_debug_config.h"
@@ -188,7 +189,7 @@ protected:
virtual void DeleteObject() = 0;
public:
VMArea* areas;
VMArea::CacheList areas;
ConsumerList consumers;
// list of caches that use this cache as a source
VMCachePagesTree pages;