only the check for the segment's size under the original stack is

actually needed.
This commit is contained in:
aliaspider 2015-11-06 19:39:24 +01:00
parent 9e264473e9
commit 156a82b8a3

View File

@ -25,19 +25,6 @@ void __system_allocateStack() {
svcQueryMemory(&memInfo, &pageInfo, original_stack_bottom - 0x1000); svcQueryMemory(&memInfo, &pageInfo, original_stack_bottom - 0x1000);
if (memInfo.state != MEMSTATE_FREE)
{
original_stack_bottom = memInfo.base_addr;
original_stack_size += memInfo.size;
svcQueryMemory(&memInfo, &pageInfo, original_stack_bottom - 0x1000);
}
if (memInfo.state != MEMSTATE_FREE)
{
__allocated_stack_size = 0;
return;
}
__stacksize__ += 0xFFF; __stacksize__ += 0xFFF;
__stacksize__ &= ~0xFFF; __stacksize__ &= ~0xFFF;
__allocated_stack_size = __stacksize__ > original_stack_size ? __stacksize__ - original_stack_size: 0; __allocated_stack_size = __stacksize__ > original_stack_size ? __stacksize__ - original_stack_size: 0;