fixed wrong bump allocator init
This commit is contained in:
3
c_os/user/HeapDemo.cc
Normal file → Executable file
3
c_os/user/HeapDemo.cc
Normal file → Executable file
@ -34,4 +34,7 @@ void heap_demo() {
|
||||
|
||||
MyObj* b = new MyObj(10);
|
||||
allocator.dump_free_memory();
|
||||
|
||||
allocator.alloc(1024 * 1024); // should fail as only 1024 * 1024 - (4 + 4) bytes remain
|
||||
allocator.dump_free_memory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user