Kernel: Add a little comment header about KBuffer

This commit is contained in:
Andreas Kling 2019-08-05 11:11:00 +02:00
parent 605975adb5
commit 6b6b86fbf3
Notes: sideshowbarker 2024-07-19 12:52:50 +09:00

View File

@ -1,5 +1,15 @@
#pragma once
// KBuffer: Statically sized kernel-only memory buffer.
//
// A KBuffer is a value-type convenience class that wraps a NonnullRefPtr<KBufferImpl>.
// The memory is allocated via the global kernel-only page allocator, rather than via
// kmalloc() which is what ByteBuffer/Vector/etc will use.
//
// This makes KBuffer a little heavier to allocate, but much better for large and/or
// long-lived allocations, since they don't put all that weight and pressure on the
// severely limited kmalloc heap.
#include <AK/Assertions.h>
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VM/Region.h>