BarinkOS/source/kernel-test/PhysicalMemoryManagerTest.cpp
Nigel 01fcb0aa15 KERNEL: Improved Physical memory allocation code / Code refactor
* Moved tests to a different folder
* Adjusted the memory map address locations
* Improved readability of `kernel.cpp`
2022-09-02 21:09:51 +02:00

15 lines
457 B
C++

void PhysicalMemoryAllocatorTest()
{
#ifdef UNIT_TESTS
// Small test!
void* block = allocate_block();
void* block2 = allocate_block();
printf("Allocated addresss 1: 0x%x 2: 0x%x\n", (uint32_t)block ,(uint32_t)block2);
free_block(block);
free_block(block2);
void* block3 = allocate_block();
printf("Allocated addresss 3: 0x%x\n", (uint32_t)block3);
free_block(block3);
#endif
}