From 6b6b86fbf31bdf713fe6be8f6de410429248e061 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 5 Aug 2019 11:11:00 +0200 Subject: [PATCH] Kernel: Add a little comment header about KBuffer --- Kernel/KBuffer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Kernel/KBuffer.h b/Kernel/KBuffer.h index 53af587ce3..4d718d6ebe 100644 --- a/Kernel/KBuffer.h +++ b/Kernel/KBuffer.h @@ -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. +// 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 #include #include