Implement dynamic stack growth #54

Merged
td1223 merged 14 commits from ethan-stack-growth into virtual-memory 2024-11-30 23:21:34 +00:00
13 changed files with 177 additions and 415 deletions
Showing only changes of commit 13de832586 - Show all commits

View File

@@ -13,15 +13,7 @@ static bool grow_stack (const void *addr);
bool
try_alloc_new_page (const void *ptr, const void *esp)
{
if (needs_new_page (ptr, esp))
{
if (!grow_stack (ptr))
return 0;
else
return 1;
}
else
return 0;
return needs_new_page (ptr, esp) && grow_stack (ptr);
}
/* Validates a given address for being a stack query and not a generic erroneous