diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-04 10:59:24 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-04 10:59:24 +0100 |
| commit | e2bbec91d70847cc5a2ff67eb84ca4a3c2d03e85 (patch) | |
| tree | 1e7fec7c232b0c750157007113ce8f86d43b7e76 /Private/Source/UserHeap.cxx | |
| parent | aff54fd3dc6855b62c047f126c6fe20ca717ee0f (diff) | |
Kernel: Depend less on NewFS, add support for FileSystem protocol in
NewBoot.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/UserHeap.cxx')
| -rw-r--r-- | Private/Source/UserHeap.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Private/Source/UserHeap.cxx b/Private/Source/UserHeap.cxx index e22fe4f9..6a173a44 100644 --- a/Private/Source/UserHeap.cxx +++ b/Private/Source/UserHeap.cxx @@ -12,8 +12,8 @@ /// @file Heap.cxx /// @brief Heap Manager, Process heap allocator. -/// @note if you want to look at the kernel allocator, please look for KernelHeap.cxx -/// bugs: 0 +/// @note if you want to look at the kernel allocator, please look for +/// KernelHeap.cxx bugs: 0 namespace HCore { /** @@ -105,10 +105,10 @@ STATIC void ke_free_heap_internal(voidPtr virtualAddress) { /** * @brief Check for the ptr and frees it. - * + * * @param index Where to look at. * @param ptr The ptr to check. - * @return Boolean true if successful. + * @return Boolean true if successful. */ STATIC Boolean ke_check_and_free_heap(const SizeT& index, voidPtr ptr) { if (HeapManager::The()[index]) { @@ -143,8 +143,8 @@ voidPtr ke_new_heap(Int32 flags) { if (voidPtr ret = ke_find_unused_heap(flags)) return ret; // this wasn't set to true - auto ref_page = HeapManager::Leak().Leak().RequestPage( - ((flags & kPoolUser)), (flags & kPoolRw)); + auto ref_page = HeapManager::Leak().Leak().RequestPage(((flags & kPoolUser)), + (flags & kPoolRw)); if (ref_page) { ///! reserve page. @@ -153,6 +153,8 @@ voidPtr ke_new_heap(Int32 flags) { ++ref; // increment the number of addresses we have now. + ref_page->NoExecute(true); + // finally make the pool address. return ke_make_heap( reinterpret_cast<voidPtr>(ref_page.Leak()->VirtualAddress()), flags); |
