Commit Graph

18 Commits

Author SHA1 Message Date
Abdelrahman Said
7039b5437a Implement memory context realloc function 2024-03-24 19:24:36 +00:00
Abdelrahman Said
ca36e0dc35 Fix bug in the function that searches for the allocation header 2024-03-24 17:24:33 +00:00
Abdelrahman Said
3fdd897291 Implement realloc function for Arena 2024-03-24 14:57:21 +00:00
Abdelrahman Said
08703b465c Add arena allocation header 2024-03-24 13:55:13 +00:00
Abdelrahman Said
49ce26a6c2 Switch to using calloc instead of malloc 2024-03-24 11:25:52 +00:00
Abdelrahman Said
0c07437ef2 Implement memory context with main and temp arenas 2024-03-24 07:59:46 +00:00
Abdelrahman Said
063bc03974 Fix bug with clearing arena function 2024-03-24 07:49:49 +00:00
Abdelrahman Said
7bfaf53d4e Return false when initialising arena with 0 capacity 2024-03-24 07:15:39 +00:00
Abdelrahman Said
9179f9beaa Ensure arena has been allocated before attempting to free 2024-03-24 06:37:02 +00:00
6fc0b2987e Add extern "C" to all header files 2024-03-21 23:06:27 +00:00
76222d31d4 Namespace all functions 2024-03-21 07:26:26 +00:00
7948d3fd1a Ensure arena is freed when initialisation fails 2024-02-24 23:01:26 +00:00
1094a9fefb Add comment for default alignment 2024-02-24 22:59:25 +00:00
b8db582098 Implement growing arena 2024-02-24 20:27:06 +00:00
a169fe3654 Return NULL when aligning forward if ptr is NULL 2024-02-24 20:26:37 +00:00
9513c05b75 Handle NULL pointers in base arena 2024-02-24 18:44:43 +00:00
633632105b Implement base arena allocator 2024-02-24 18:40:25 +00:00
5a0aad5d52 Add memory utilities 2024-02-24 18:40:05 +00:00