From bc7870aea4c437e1a80b779eb7a968d55733d24c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 13 Jul 2024 00:20:21 +0200 Subject: [IMP] Kernel properties (such as \KernelVersion) [REFACTOR] Rename KernelHeap to just Heap. [FIX] Scheduler's way of checking boundaries was not correct. Signed-off-by: Amlal El Mahrouss --- Kernel/NewKit/String.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Kernel/NewKit/String.hpp') diff --git a/Kernel/NewKit/String.hpp b/Kernel/NewKit/String.hpp index cfff3e3c..7440900c 100644 --- a/Kernel/NewKit/String.hpp +++ b/Kernel/NewKit/String.hpp @@ -8,6 +8,7 @@ #include #include +#include #include namespace Kernel @@ -15,7 +16,15 @@ namespace Kernel class StringView final { public: - explicit StringView() = default; + explicit StringView() + { + fSz = 4096; + + fData = new Char[fSz]; + MUST_PASS(fData); + + rt_set_memory(fData, 0, fSz); + } explicit StringView(Size Sz) : fSz(Sz) @@ -23,6 +32,8 @@ namespace Kernel MUST_PASS(Sz > 1); fData = new Char[Sz]; MUST_PASS(fData); + + rt_set_memory(fData, 0, Sz); } ~StringView() -- cgit v1.2.3