diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-24 03:02:43 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-24 03:02:43 +0100 |
| commit | 83d870e58457a1d335a1d9b9966a6a1887cc297b (patch) | |
| tree | 72888f88c7728c82f3f6df1f4f70591de15eab36 /dev/libDDK/src/ddk_alloc.c | |
| parent | ab37adbacf0f33845804c788b39680cd754752a8 (diff) | |
feat! breaking changes on kernel sources.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/libDDK/src/ddk_alloc.c')
| -rw-r--r-- | dev/libDDK/src/ddk_alloc.c | 32 |
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); -} |
