调整分配器成员:

移除initialized,增加userspace
This commit is contained in:
pointer-to-bios 2024-02-19 02:29:11 +08:00
parent 2aaa592636
commit 501643f86a
1 changed files with 2 additions and 1 deletions

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)