1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

LibJS: Use IntrusiveList for Allocator's block lists

This way we don't need to deal with shifting vector storage, and most
operations are upgraded from O(n) to O(1) :^)
This commit is contained in:
Andreas Kling 2020-10-07 14:04:52 +02:00
parent eeffd5be07
commit c541310e19
3 changed files with 17 additions and 18 deletions

View file

@ -26,6 +26,7 @@
#pragma once
#include <AK/IntrusiveList.h>
#include <AK/Types.h>
#include <LibJS/Forward.h>
#include <LibJS/Runtime/Cell.h>
@ -79,6 +80,8 @@ public:
return cell(cell_index);
}
IntrusiveListNode m_list_node;
private:
HeapBlock(Heap&, size_t cell_size);