base allocator logic
This commit is contained in:
17
src/main.c
17
src/main.c
@@ -1,3 +1,18 @@
|
||||
#include "memory/allocator.h"
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
JLANG_memory_allocator *allocPtr = JLANG_CreateAllocator();
|
||||
|
||||
printf("allocatorPtr=%p\n", allocPtr);
|
||||
printf("memoryPtr=%p\n", allocPtr->memory);
|
||||
printf("size=%zu\n", allocPtr->size);
|
||||
|
||||
JLANG_visualize(allocPtr);
|
||||
|
||||
void *var1 = JLANG_malloc(allocPtr, 512);
|
||||
printf("var1Ptr=%p\n", var1);
|
||||
|
||||
JLANG_visualize(allocPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user