Commit graph

13 commits

Author SHA1 Message Date
Ronald Caesar
cc2fb074e3 Switch to casserts
Pound's asserts were broken from the very beginning and I've just
realized this. Fixing it is not my problem.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-08-16 22:47:47 -04:00
Ronald Caesar
556ace64e8 memory: Move arena allocator into pound::memory namespace
The existing memory arena impelmentation is moved into the pound::memory
namespace to align with the pound::aarch64 namespace.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-08-16 12:58:51 -04:00
Sinan
a05e4c88a1
Feat: added support for std::allocator (#65)
* feat(memory): added arena_allocator for STL data types support
* fix(memory): fixed arena_allocate offset compute
2025-08-10 06:54:02 +00:00
Ronald Caesar
b41e8b9d4f
memory: updated arena_init() docs
arena_init() has been given the parameter `size_t capacity`, however,
docs amd some definitions wasn't changed to reflect this.

The definition MEMORY_CAPACITY was replaced by `size_t capacity` but
it wasn't removed.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-08-10 02:10:06 -04:00
Ronald Caesar
ba45834583
feat!: rewrote program in a data oriented style.
This is because the source code is objected oriented which is not cpu cache
friendly, making the program slower than it has to be. Yuzu's entire
codebase is written in a objected oriented way and I wonder how much faster
it could if they had use DoD principles from the very beginning.

That's why I want to instill DoD fundamentals early on so this won't be a
problem going forward.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-08-02 04:05:05 -04:00
Ronald Caesar
b603b978ea fix(memory): remove MAP_FAILED from windows builds
Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-07-09 18:17:40 -04:00
Ronald Caesar
7897d0e2a2 fix(memory): remove the inclusion of mman.h on windows.
Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-07-09 18:10:33 -04:00
Ronald Caesar
6ad2d300fb fix(memory): remove the inclusion of mman.h on windows.
Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-07-09 17:56:39 -04:00
Ronald Caesar
d1ada1740a fix(memory): Fixed missing mman.h include definitions
This commit removes a custom mmap() function which was supposed
to support both windows and linux but the linux and macOS builds
failed to compile.

The custom mmap() function will be replaced by malloc() for windows
and linux's native mmap().

Signed-off-by: Ronald Caesar <github43132@proton.me>
2025-07-09 17:38:10 -04:00
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