1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:38:10 +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:
Andreas Kling 2019-08-08 11:08:27 +02:00
parent 07425580a8
commit 318068fe1b
5 changed files with 34 additions and 21 deletions

View file

@ -593,11 +593,11 @@ Optional<KBuffer> procfs$all(InodeIdentifier)
Optional<KBuffer> procfs$inodes(InodeIdentifier)
{
extern HashTable<Inode*>& all_inodes();
extern InlineLinkedList<Inode>& all_inodes();
KBufferBuilder builder;
for (auto it : all_inodes()) {
RefPtr<Inode> inode = *it;
builder.appendf("Inode{K%x} %02u:%08u (%u)\n", inode.ptr(), inode->fsid(), inode->index(), inode->ref_count());
InterruptDisabler disabler;
for (auto* inode = all_inodes().head(); inode; inode = inode->next()) {
builder.appendf("Inode{K%x} %02u:%08u (%u)\n", inode, inode->fsid(), inode->index(), inode->ref_count());
}
return builder.build();
}