| Bill Allombert on Fri, 30 Jan 2026 13:58:02 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: pari_stackcheck_init using Win32 API |
On Wed, Jan 28, 2026 at 04:00:00PM +0800, 管理员 wrote:
> void pari_stackcheck_init(void *pari_stack_base) {
> SYSTEM_INFO si;
> MEMORY_BASIC_INFORMATION mbi;
> ulong stack_size;
>
> if (!pari_stack_base) { PARI_stack_limit = NULL; return; }
>
> GetSystemInfo(&si);
> if (VirtualQuery(pari_stack_base, &mbi, sizeof(mbi)) != sizeof(mbi))
> stack_size = 1UL << 21;
> else
> stack_size = (ulong)pari_stack_base - (ulong)mbi.AllocationBase;
>
> PARI_stack_limit = (char*)mbi.AllocationBase + maxuu(stack_size >> 4, (ulong)(4 * si.dwPageSize));
> }
Thanks for your contribution !
Could you send this change as a patch instead ?
How do you write your name in english for the changelog ?
Cheers,
Bill.