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:
parent
eeffd5be07
commit
c541310e19
3 changed files with 17 additions and 18 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue