ladybird/Kernel/VM
Lenny Maiorani 5751327195 Kernel: static vs non-static constexpr variables
Problem:
- `static` variables consume memory and sometimes are less
  optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
  every time the function is run.

Solution:
- If a global `static` variable is only used in a single function then
  move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
  `constexpr`.
2021-05-19 21:21:47 +01:00
..
AllocationStrategy.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
AnonymousVMObject.cpp AK+Kernel+LibELF: Remove the need for IteratorDecision::Continue 2021-05-16 10:36:52 +01:00
AnonymousVMObject.h AK+Kernel+LibELF: Remove the need for IteratorDecision::Continue 2021-05-16 10:36:52 +01:00
ContiguousVMObject.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
ContiguousVMObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
InodeVMObject.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
InodeVMObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MappedROM.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MemoryManager.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MemoryManager.h Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
PageDirectory.cpp Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
PageDirectory.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
PageFaultResponse.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
PhysicalPage.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
PhysicalPage.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PhysicalRegion.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
PhysicalRegion.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PrivateInodeVMObject.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
PrivateInodeVMObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessPagingScope.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessPagingScope.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PurgeablePageRanges.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PurgeablePageRanges.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Range.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Range.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RangeAllocator.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RangeAllocator.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Region.cpp Kernel: Change Inode::{read/write}_bytes interface to KResultOr<ssize_t> 2021-05-02 13:27:37 +02:00
Region.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RingBuffer.cpp Kernel: Create VM::RingBuffer class 2021-05-13 10:00:42 +02:00
RingBuffer.h Kernel: Create VM::RingBuffer class 2021-05-13 10:00:42 +02:00
ScatterGatherList.cpp Kernel: Make AnonymousVMObject physical page APIs OOM safe 2021-05-15 09:01:32 +02:00
ScatterGatherList.h Kernel: Make AnonymousVMObject physical page APIs OOM safe 2021-05-15 09:01:32 +02:00
SharedInodeVMObject.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
SharedInodeVMObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Space.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Space.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TypedMapping.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
VMObject.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
VMObject.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00