ladybird/Kernel/Net
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
..
ARP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
E1000NetworkAdapter.cpp Kernel: Make sure we read all packets 2021-05-01 20:08:08 +02:00
E1000NetworkAdapter.h Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
EthernetFrameHeader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EtherType.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICMP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
IPv4.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
IPv4Socket.cpp Kernel: Make UDPSocket::create() API OOM safe 2021-05-13 16:21:53 +02:00
IPv4Socket.h Kernel: Avoid allocating KBuffers for TCP packets 2021-05-12 13:47:07 +02:00
IPv4SocketTuple.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LocalSocket.cpp Kernel: Make LocalSocket factory APIs OOM safe 2021-05-13 16:21:53 +02:00
LocalSocket.h Kernel+LibC: Implement the socketpair() syscall 2021-04-28 14:19:45 +02:00
LoopbackAdapter.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LoopbackAdapter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NE2000NetworkAdapter.cpp Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
NE2000NetworkAdapter.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
NetworkAdapter.cpp Kernel: Avoid allocations when receiving network packets 2021-05-18 16:06:27 +02:00
NetworkAdapter.h Kernel: Avoid allocations when receiving network packets 2021-05-18 16:06:27 +02:00
NetworkTask.cpp Kernel: Log unexpected TCP packet flags in NetworkTask handle_tcp() 2021-05-15 09:46:50 +02:00
NetworkTask.h Kernel: Avoid deadlock when trying to send packets from the NetworkTask 2021-04-30 23:11:56 +02:00
Routing.cpp Kernel: Route packets destined for us through the loopback adapter 2021-05-12 16:31:29 +02:00
Routing.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RTL8139NetworkAdapter.cpp Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
RTL8139NetworkAdapter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Socket.cpp Kernel: Harden Socket Vector usage against OOM 2021-05-01 09:10:30 +02:00
Socket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TCP.h Kernel: Set MSS option for outbound TCP SYN packets 2021-05-12 13:47:07 +02:00
TCPSocket.cpp Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
TCPSocket.h Kernel: Avoid allocations when handling network packets 2021-05-16 17:49:42 +02:00
UDP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDPSocket.cpp Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
UDPSocket.h Kernel: Make UDPSocket::create() API OOM safe 2021-05-13 16:21:53 +02:00