Improved get_free_resource_slot()

Table now tries to expand itself when no available slots are left
This commit is contained in:
2021-04-17 04:59:39 -05:00
parent a28e586139
commit 2a5dcd4a0f
3 changed files with 24 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ int load_module(struct kernel_t *kernel, struct module_t *module)
}
load_offset += page_size;
}
int index = find_resource_slot(kernel);
int index = get_free_resource_slot(kernel, kernel->page_stack);
if(index < 0)
{
panic("no space left in resource table for module");