diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-13 00:20:21 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-13 00:20:21 +0200 |
| commit | bc7870aea4c437e1a80b779eb7a968d55733d24c (patch) | |
| tree | 7998fe2f1ef8d3bdf8d37a0b2b2600143bc285ed /Kernel/NewKit/String.hpp | |
| parent | 710ce66beaba3bee7289047406ef794c258143e6 (diff) | |
[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 <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/NewKit/String.hpp')
| -rw-r--r-- | Kernel/NewKit/String.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
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 <NewKit/Defines.hpp> #include <NewKit/ErrorOr.hpp> +#include <NewKit/Utils.hpp> #include <NewKit/KernelCheck.hpp> 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() |
