Default per-thread stack size.

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Default per-thread stack size.

Unread post by BenFenner » 2022-08-02, 14:40

The release notes for the latest release v31.2.0 (2022-08-02) say:
The default per-thread stack size is now 2 MB with the exception of 32-bit Windows builds where 1.5 MB is used to go easy on its limited address space.
http://www.palemoon.org/releasenotes.shtml

Pardon my completely outsider question, but is that "MB" correct? We are talking about Megabytes here, not Gigabytes? I would not be surprised if "MB" is correct, I just thought I'd check that half a megabyte really makes a difference for 32-bit Windows' limited address space.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 195
Joined: 2020-03-02, 16:04

Re: Default per-thread stack size.

Unread post by Nuck-TH » 2022-08-02, 17:19

Available address space is irrelevant to stack size.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Default per-thread stack size.

Unread post by Moonchild » 2022-08-02, 18:00

MB is correct. This is stack, not heap. Also this is per-thread, of which the browser uses many :)
Nuck-TH wrote:
2022-08-02, 17:19
Available address space is irrelevant to stack size.
Actually, it is relevant. This isn't about address size (memory space), but address space in the OS (logical addresses). There's a limit to how many addresses can be kept track of by the OS's memory manager which is relatively limited on 32-bit Windows.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
biopsin
Fanatic
Fanatic
Posts: 119
Joined: 2016-02-07, 17:15

Re: Default per-thread stack size.

Unread post by biopsin » 2022-08-02, 22:29

Custom Linux builds with system-default small stack sizes should adjust their build configuration accordingly.
Does this mean as ulimit -s show 8192, the system-default is set to 8mb and I dont need to adjust anything?
voidlinux_x64 glibc-2.38 / Palemoon_latest release (gcc-13.2.0) / GTK2

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Default per-thread stack size.

Unread post by Moonchild » 2022-08-02, 22:44

Linux should be fine in just about every case (I think maybe only Alpine might be a problem). Regardless, unless you build from source yourself it should already be good as mainline will have been built with the proper stack size when linking.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Default per-thread stack size.

Unread post by BenFenner » 2022-08-03, 01:02

Moonchild wrote:
2022-08-02, 18:00
MB is correct. This is stack, not heap. Also this is per-thread, of which the browser uses many :)
Got it. :thumbup:
And now I have no idea why I thought PM used a single thread. I must have been thinking single-process versus single-thread...

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Default per-thread stack size.

Unread post by Moonchild » 2022-08-03, 04:21

BenFenner wrote:
2022-08-03, 01:02
And now I have no idea why I thought PM used a single thread.
Probably because people have been misusing the term "thread" all over the place to mean "CPU core" or "process"
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked