diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-30 10:36:15 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-30 10:36:15 +0200 |
| commit | b3c3b0f62331a695fb7c90c386c15396b6607575 (patch) | |
| tree | 00493a0039673d5604d4f42ea1d957c033670b93 /dev/kernel/src/UserProcessScheduler.cc | |
| parent | f3062a7d633d123c2de863398d174a0dd6516d85 (diff) | |
feat: Introducing `FileTree` allocation and WiP DebugSrv integration.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/UserProcessScheduler.cc')
| -rw-r--r-- | dev/kernel/src/UserProcessScheduler.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dev/kernel/src/UserProcessScheduler.cc b/dev/kernel/src/UserProcessScheduler.cc index 94099c0a..621c848b 100644 --- a/dev/kernel/src/UserProcessScheduler.cc +++ b/dev/kernel/src/UserProcessScheduler.cc @@ -124,6 +124,17 @@ ErrorOr<VoidPtr> USER_PROCESS::New(SizeT sz, SizeT pad_amount) { auto ptr = mm_alloc_ptr(sz, Yes, Yes, pad_amount); #endif + if (!this->FileTree) { + this->FileTree = new PROCESS_FILE_TREE<VoidPtr>(); + + if (!this->FileTree) { + this->Crash(); + return ErrorOr<VoidPtr>(-kErrorHeapOutOfMemory); + } + + /// @todo File Tree allocation and dispose methods (amlal) + } + if (!this->HeapTree) { this->HeapTree = new PROCESS_HEAP_TREE<VoidPtr>(); |
