diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-15 21:16:53 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-16 01:01:08 +0200 |
commit | 03b735228685a372b7e3a63d50cd666ed8b0b30e (patch) | |
tree | 0bd5ada90cf93ffa47aa32867ad94c86d1058457 /Kernel | |
parent | d3dfb957a66506345b3100427e44a77e3385000f (diff) | |
download | serenity-03b735228685a372b7e3a63d50cd666ed8b0b30e.zip |
Kernel: Specify inline capacity of return type in capture_stack_trace
Since the inline capacity of the Vector return type was not specified
explicitly, the vector was automatically copied to a 0-length inline
capacity one, essentially eliminating the optimization.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Arch/x86/Processor.h | 2 | ||||
-rw-r--r-- | Kernel/Arch/x86/common/Processor.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Arch/x86/Processor.h b/Kernel/Arch/x86/Processor.h index 8455e55bf1..b36f0071c2 100644 --- a/Kernel/Arch/x86/Processor.h +++ b/Kernel/Arch/x86/Processor.h @@ -398,7 +398,7 @@ public: NEVER_INLINE void switch_context(Thread*& from_thread, Thread*& to_thread); [[noreturn]] static void assume_context(Thread& thread, FlatPtr flags); FlatPtr init_context(Thread& thread, bool leave_crit); - static Vector<FlatPtr> capture_stack_trace(Thread& thread, size_t max_frames = 0); + static Vector<FlatPtr, 32> capture_stack_trace(Thread& thread, size_t max_frames = 0); static StringView platform_string(); }; diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp index 135627fe5b..dfcdf9ab00 100644 --- a/Kernel/Arch/x86/common/Processor.cpp +++ b/Kernel/Arch/x86/common/Processor.cpp @@ -491,7 +491,7 @@ const DescriptorTablePointer& Processor::get_gdtr() return m_gdtr; } -Vector<FlatPtr> Processor::capture_stack_trace(Thread& thread, size_t max_frames) +Vector<FlatPtr, 32> Processor::capture_stack_trace(Thread& thread, size_t max_frames) { FlatPtr frame_ptr = 0, ip = 0; Vector<FlatPtr, 32> stack_trace; |