From 1b09896afcf562d199d4df8d671601bba2b1f081 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 4 Feb 2024 14:19:54 -0500 Subject: refactor arch --- include/memory/physalloc.h | 30 ------------------------------ include/memory/virtalloc.h | 24 ------------------------ 2 files changed, 54 deletions(-) delete mode 100644 include/memory/physalloc.h delete mode 100644 include/memory/virtalloc.h (limited to 'include/memory') diff --git a/include/memory/physalloc.h b/include/memory/physalloc.h deleted file mode 100644 index e95e418..0000000 --- a/include/memory/physalloc.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#ifndef MEMORY_INTERNAL - #error "Do not include headers from , only use " -#endif - -/** - * Allocates a single physical page in memory - * @preturns the physical address of the page - */ -void *alloc_phys_page(void); - -/** - * Allocates count physical pages in memory - * @returns the physical address of the first page - */ -void *alloc_phys_pages(int count); - -/** -* Frees a single physical page in memory - * @param ptr - the physical address of the page - */ -void free_phys_page(void *ptr); - -/** - * Frees count physical pages in memory - * @param ptr - the physical address of the first page - * @param count - the number of pages in the list - */ -void free_phys_pages(void *ptr, int count); diff --git a/include/memory/virtalloc.h b/include/memory/virtalloc.h deleted file mode 100644 index c4bac56..0000000 --- a/include/memory/virtalloc.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#ifndef MEMORY_INTERNAL - #error "Do not include headers from , only use " -#endif - -/** - * Initalizes the virtual address allocator - */ -void virtaddr_init(void); - -/** - * Allocate a virtual address of length x pages - * @param pages - x pages - * @returns virt addr - */ -void *virtaddr_alloc(int pages); - -/** - * Free the virtual address from virtaddr_alloc - * @param virtaddr - the addr to free - * @returns number of pages used for virtaddr - */ -long virtaddr_free(void *virtaddr); -- cgit v1.2.3-freya