1

implement rounding to word borders when allocating

This commit is contained in:
churl
2022-05-09 16:45:01 +02:00
parent 10d790f613
commit f57b8fef27
2 changed files with 20 additions and 6 deletions

View File

@ -30,6 +30,13 @@ void heap_demo() {
/* hier muss Code eingefuegt werden */
allocator.dump_free_memory();
// Rounding to word border
kout << "ROUNDING ====================================================================" << endl;
void* alloc = allocator.alloc(1);
allocator.dump_free_memory();
allocator.free(alloc);
allocator.dump_free_memory();
// Some objects and forward/backward merging
kout << "SOME OBJECTS ================================================================" << endl;
MyObj* a = new MyObj(5);