mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-17 01:03:58 +12:00
Proper stack management
This commit is contained in:
parent
4a12e59c2f
commit
2ec3884189
4 changed files with 48 additions and 8 deletions
src/core/loader
|
@ -14,6 +14,13 @@ std::optional<u32> Memory::loadELF(std::ifstream& file) {
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
// Allocate stack space. For ELFs we use the default stack size, which is 16KB
|
||||
if (!allocateMainThreadStack(VirtualAddrs::DefaultStackSize)) {
|
||||
// Should be unreachable
|
||||
printf("Failed to allocate stack space for ELF file\n");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto segNum = reader.segments.size();
|
||||
printf("Number of segments: %d\n", segNum);
|
||||
printf(" # Perms Vaddr File Size Mem Size\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue