fix sys_poll_session performance bug.

This commit is contained in:
TXuian
2024-04-02 10:56:28 +08:00
parent f5ad8437b5
commit a2e5b49b19
15 changed files with 81 additions and 223 deletions
@@ -169,13 +169,11 @@ int task_exec(struct TaskMicroDescriptor* task, char* img_start, char* name, cha
}
strncpy(task->name, last, sizeof(task->name));
struct TopLevelPageDirectory old_pgdir = task->pgdir;
xizi_pager.free_user_pgdir(&task->pgdir);
task->pgdir = pgdir;
/// @todo record mem size used b task
task->mem_size = ALIGNUP(load_size, PAGE_SIZE);
xizi_pager.free_user_pgdir(&old_pgdir);
task->heap_base = ALIGNUP(load_size, PAGE_SIZE);
task->mem_size = task->heap_base + USER_STACK_SIZE;
return 0;
error_exec: