重构内存分配器、增加中断支持、整理rust运行时环境 #4

Merged
pointer-to-bios merged 39 commits from downstream into main 2024-04-11 00:36:14 +08:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 501643f86a - Show all commits

View File

@ -228,7 +228,8 @@ void memm_free(void *mem)
if (allocator->magic != MEMM_ALLOCATOR_MAGIC)
return;
if (is_user_address((u64)mem))
{ // TODO 对于用户空间的地址需要先转换到内核地址后释放
{
mem = mem - allocator->userspace + (void *)allocator;
}
allocator->free(allocator->allocator_instance, mem);
if (allocator->full)