Subject: Re: bug#76041: 31.0.50; comments above creating reader_thread in w32proc.c can be improved

From: Eli Zaretskii <[email-masked]>
Date: Tue, 04 Feb 2025 15:45:59 +0200

> Date: Tue, 4 Feb 2025 12:54:51 +0800
> From:  "Yue Yi" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> On May 28, 2014, Fabrice Popineau replaced GNU's malloc with the
> system’s allocation functions in commit 587fd08, and allocate_heap
> was removed. Therefore, I believe the above comment is somewhat
> outdated.
> 
> My suggestion is to remove the 2GB-related part in the
> comment.

Yes, okay.

> Allocating a small amount of stack space for each
> reader_thread still makes sense, because excessive threads would
> consume too much address space on a 32-bit system.

Right.  In particular, if we want to support 1024 subprocesses, which
means more than 1000 threads, giving 8MB of stack to each of those
threads is impossible for 32-bit Emacs.

> Additionally, I noticed the recent merge of no-purespace, which
> removed support for unexec. The alias for RtlCreateHeap_Proc in
> win32heap.c and the related comment seem to be redundant now.

That's true, but let's wait with removing these until Po Lu says he's
done with handling the fallout of unexec removal.