Commit graph

4 commits

Author SHA1 Message Date
ownedbywuigi
b7fc40f4f6 HOPEFULLY NOW IT WILL WORK I HATE NT I HATE NT I HATE NT 2025-07-08 04:22:29 +01:00
ownedbywuigi
982c0e9cd4 Modify it to use our mman.h 2025-07-08 04:13:19 +01:00
ownedbywuigi
6466c04321 replace mallo with mmao 2025-07-08 03:59:45 +01:00
Ronald Caesar
d3c97317ef filesystem: Add memory arena allocator
I wanted a fast and predictable memory allocator before I start working on the virtual filesystem.
Functions like malloc and realloc will not be used anymore, instead, the allocator will
need to be passed as a function parameter when doing any kind of heap allocation. For example

    char* create_string(Memory::Arena *allocator);
    int* create_int_array(Memory::Arena *allocator, int size);

The definition MEMORY_CAPACITY in arena.h sets the amount of memory the arena can use.
The number can be increased as needed.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-07-07 11:37:55 -04:00