Refactor stack growth #57

Merged
sb3923 merged 17 commits from vm/stack-growth/saleh into vm/virtual-memory/saleh 2024-12-05 00:53:35 +00:00
11 changed files with 171 additions and 251 deletions
Showing only changes of commit 13de832586 - Show all commits

View File

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