1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

Kernel: Use a FixedArray for a process's extra GIDs

There's not really enough of these to justify using a HashTable.
This commit is contained in:
Andreas Kling 2020-02-18 10:19:32 +01:00
parent e0ecfc0c92
commit a7dbb3cf96
5 changed files with 42 additions and 12 deletions

View file

@ -26,6 +26,7 @@
#pragma once
#include <AK/FixedArray.h>
#include <AK/HashMap.h>
#include <AK/InlineLinkedList.h>
#include <AK/NonnullOwnPtrVector.h>
@ -134,7 +135,7 @@ public:
pid_t pgid() const { return m_pgid; }
uid_t uid() const { return m_uid; }
gid_t gid() const { return m_gid; }
const HashTable<gid_t>& extra_gids() const { return m_extra_gids; }
const FixedArray<gid_t>& extra_gids() const { return m_extra_gids; }
uid_t euid() const { return m_euid; }
gid_t egid() const { return m_egid; }
pid_t ppid() const { return m_ppid; }
@ -485,7 +486,7 @@ private:
pid_t m_ppid { 0 };
mode_t m_umask { 022 };
HashTable<gid_t> m_extra_gids;
FixedArray<gid_t> m_extra_gids;
RefPtr<ProcessTracer> m_tracer;
OwnPtr<ELFLoader> m_elf_loader;