From 85564b018d70fd93c88c74815f89bf434a53c24f Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Sun, 5 Nov 2023 05:59:45 -0800 Subject: [PATCH] [Zion] Add todo comment for storing memory mappings in the address space. --- zion/object/address_space.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zion/object/address_space.h b/zion/object/address_space.h index 691fc08..36571cc 100644 --- a/zion/object/address_space.h +++ b/zion/object/address_space.h @@ -92,6 +92,13 @@ class AddressSpace : public KernelObject { uint64_t vaddr; glcr::RefPtr mem_obj; }; + + // TODO: Consider adding a red-black tree implementation here. + // As is this tree functions about as well as a linked list + // because mappings are likely to be added in near-perfect ascedning order. + // Also worth considering creating a special tree implementation for + // just this purpose, or maybe a BinaryTree implementation that accepts + // ranges rather than a single key. glcr::BinaryTree memory_mappings_; glcr::Optional> GetMemoryMappingForAddr(