summaryrefslogtreecommitdiffhomepage
path: root/dev/libDDK/src/ddk_alloc.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-23 21:06:27 -0500
committerGitHub <noreply@github.com>2025-11-23 21:06:27 -0500
commit23040fad647634c08697451fc22ee2ca999629c8 (patch)
tree72888f88c7728c82f3f6df1f4f70591de15eab36 /dev/libDDK/src/ddk_alloc.c
parente5cc7351f0577b54c528fb827a7c7e6306c3e843 (diff)
parent83d870e58457a1d335a1d9b9966a6a1887cc297b (diff)
Merge pull request #81 from nekernel-org/dev
feat! breaking changes on kernel sources.
Diffstat (limited to 'dev/libDDK/src/ddk_alloc.c')
-rw-r--r--dev/libDDK/src/ddk_alloc.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/dev/libDDK/src/ddk_alloc.c b/dev/libDDK/src/ddk_alloc.c
deleted file mode 100644
index 09f3034f..00000000
--- a/dev/libDDK/src/ddk_alloc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* ========================================
-
- Copyright Amlal El Mahrouss.
-
- Purpose: DDK allocator.
-
-======================================== */
-
-#include <DriverKit/ddk.h>
-
-/**
- \brief Allocates a new heap on the Kernel's side.
- \param sz the size of the heap block.
- \return the newly allocated pointer.
-*/
-DDK_EXTERN void* kalloc(size_t sz) {
- if (!sz) ++sz;
-
- void* ptr = ke_call_dispatch("mm_alloc_ptr", 1, &sz, sizeof(size_t));
-
- return ptr;
-}
-
-/**
- \brief Frees a pointer from the heap.
- \param ptr the pointer to free.
-*/
-DDK_EXTERN void kfree(void* ptr) {
- if (!ptr) return;
-
- ke_call_dispatch("mm_free_ptr", 1, ptr, 0);
-}