diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-28 19:12:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-28 21:02:38 +0100 |
commit | ac7ce121236b056e49522b539112e50ab987cd11 (patch) | |
tree | cbb027e0df58e528dd4bf26b5d2d3e0404124b4e /Kernel/Devices/PCISerialDevice.cpp | |
parent | a1be1358918505eedbcdb2d5600194c96b8260c7 (diff) | |
download | serenity-ac7ce121236b056e49522b539112e50ab987cd11.zip |
Kernel: Remove the kmalloc_eternal heap :^)
This was a premature optimization from the early days of SerenityOS.
The eternal heap was a simple bump pointer allocator over a static
byte array. My original idea was to avoid heap fragmentation and improve
data locality, but both ideas were rooted in cargo culting, not data.
We would reserve 4 MiB at boot and only ended up using ~256 KiB, wasting
the rest.
This patch replaces all kmalloc_eternal() usage by regular kmalloc().
Diffstat (limited to 'Kernel/Devices/PCISerialDevice.cpp')
-rw-r--r-- | Kernel/Devices/PCISerialDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Devices/PCISerialDevice.cpp b/Kernel/Devices/PCISerialDevice.cpp index c89d80427f..7658088769 100644 --- a/Kernel/Devices/PCISerialDevice.cpp +++ b/Kernel/Devices/PCISerialDevice.cpp @@ -30,7 +30,7 @@ UNMAP_AFTER_INIT void PCISerialDevice::detect() // If this is the first port of the first pci serial device, store it as the debug PCI serial port (TODO: Make this configurable somehow?) if (!is_available()) s_the = serial_device; - // NOTE: We intentionally leak the reference to serial_device here, as it is eternal + // NOTE: We intentionally leak the reference to serial_device here. } dmesgln("PCISerialDevice: Found {} @ {}", board_definition.name, device_identifier.address()); |