Feat: add memalloc command
This commit is contained in:
@@ -16,8 +16,7 @@ void *simple_alloc(size_t size)
|
||||
_heap_top = (void *)&__heap_start;
|
||||
}
|
||||
|
||||
if (size & 0xff)
|
||||
size = (size & ~0xff) + 0x100;
|
||||
size = (size_t)ALIGN8(size);
|
||||
|
||||
if ((uint64_t)_heap_top + size >= (uint64_t)&__heap_end)
|
||||
exit(ERR_NO_MEM);
|
||||
|
||||
Reference in New Issue
Block a user