summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-20 14:02:19 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-20 14:02:19 +0200
commit5eedb2283488fafef98c20729bc6917c6de957e5 (patch)
tree99f5fa12e15a4134f5b53f13ab34dcca1cb5efbf /Kernel
parent7faf8fabf20d703141bc873716e8bea7692d1975 (diff)
downloadserenity-5eedb2283488fafef98c20729bc6917c6de957e5.zip
Sprinkle use of AK::Vector in various places.
Some of these are less helpful than others. Avoiding a bunch of mallocs in the event loop wakeup code is definitely nice.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.cpp2
-rw-r--r--Kernel/Thread.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 7390085369..af7716c0bd 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -2276,7 +2276,7 @@ void SharedBuffer::destroy_if_unused()
void Process::disown_all_shared_buffers()
{
LOCKER(shared_buffers().lock());
- Vector<SharedBuffer*> buffers_to_disown;
+ Vector<SharedBuffer*, 32> buffers_to_disown;
for (auto& it : shared_buffers().resource())
buffers_to_disown.append(it.value.ptr());
for (auto* shared_buffer : buffers_to_disown)
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp
index c052d4aaab..ebd43a23b4 100644
--- a/Kernel/Thread.cpp
+++ b/Kernel/Thread.cpp
@@ -167,7 +167,7 @@ void Thread::finalize()
void Thread::finalize_dying_threads()
{
- Vector<Thread*> dying_threads;
+ Vector<Thread*, 32> dying_threads;
{
InterruptDisabler disabler;
for_each_in_state(Thread::State::Dying, [&] (Thread& thread) {