mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
Kernel: Turns global Custody and Inode tables into InlineLinkedLists
Yet more of this same thing. Each one of these patches has a small but noticeable impact on the steady-state kmalloc numbers. :^)
This commit is contained in:
parent
07425580a8
commit
318068fe1b
5 changed files with 34 additions and 21 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/InlineLinkedList.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
|
@ -15,7 +16,9 @@ class InodeVMObject;
|
|||
class InodeWatcher;
|
||||
class LocalSocket;
|
||||
|
||||
class Inode : public RefCounted<Inode>, public Weakable<Inode> {
|
||||
class Inode : public RefCounted<Inode>
|
||||
, public Weakable<Inode>
|
||||
, public InlineLinkedListNode<Inode> {
|
||||
friend class VFS;
|
||||
friend class FS;
|
||||
|
||||
|
@ -77,6 +80,10 @@ public:
|
|||
void register_watcher(Badge<InodeWatcher>, InodeWatcher&);
|
||||
void unregister_watcher(Badge<InodeWatcher>, InodeWatcher&);
|
||||
|
||||
// For InlineLinkedListNode.
|
||||
Inode* m_next { nullptr };
|
||||
Inode* m_prev { nullptr };
|
||||
|
||||
protected:
|
||||
Inode(FS& fs, unsigned index);
|
||||
void set_metadata_dirty(bool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue