feat: reformatted code base to be more standard
This commit is contained in:
22
include/myke/mem/malloc.h
Normal file
22
include/myke/mem/malloc.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by rick on 23-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_MALLOC_H
|
||||
#define NEW_KERNEL_MALLOC_H
|
||||
// retrieved from https://github.com/blanham/liballoc
|
||||
#include <sys/types.h>
|
||||
|
||||
void *malloc(size_t);
|
||||
|
||||
void *realloc(void *, size_t);
|
||||
|
||||
void *calloc(size_t, size_t);
|
||||
|
||||
void free(void *);
|
||||
|
||||
#ifndef INCLUDE_STDLIB
|
||||
void print_malloc_info();
|
||||
#endif
|
||||
|
||||
#endif //NEW_KERNEL_MALLOC_H
|
||||
14
include/myke/mem/mem.h
Normal file
14
include/myke/mem/mem.h
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// Created by rick on 22-04-20.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_MEM_H
|
||||
#define NEW_KERNEL_MEM_H
|
||||
|
||||
#include <multiboot.h>
|
||||
|
||||
void mmap_init_multiboot(struct multiboot_mmap_entry *entries, uint32_t count);
|
||||
|
||||
void print_mmap_info();
|
||||
|
||||
#endif //NEW_KERNEL_MEM_H
|
||||
8
include/myke/mem/paging.h
Normal file
8
include/myke/mem/paging.h
Normal file
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// Created by rick on 21-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_PAGING_H
|
||||
#define NEW_KERNEL_PAGING_H
|
||||
|
||||
#endif //NEW_KERNEL_PAGING_H
|
||||
16
include/myke/mem/pmm.h
Normal file
16
include/myke/mem/pmm.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Created by rick on 23-02-21.
|
||||
//
|
||||
|
||||
#ifndef NEW_KERNEL_PMM_H
|
||||
#define NEW_KERNEL_PMM_H
|
||||
#include <sys/types.h>
|
||||
|
||||
// 4k blocks
|
||||
#define PAGE_SIZE 4096
|
||||
|
||||
void pmm_init(void* start_addr, size_t size);
|
||||
void *pmm_get_pages(uint32_t num_pages);
|
||||
void pmm_free_pages(void* page, uint32_t num_pages);
|
||||
|
||||
#endif //NEW_KERNEL_PMM_H
|
||||
Reference in New Issue
Block a user