Jean-Luc Arnaud on Tue, 12 Sep 2023 14:30:45 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

threadsizemax management


Hi all,

I'm quite sure htreadsizemax is managed on a per thread basis, isn't?

I have a script using 2 threads, and only one generates Warning: increasing size stack to...

So, I think it's possible to set up threadsizemax to a larger value than the full amount of available RAM. Am i right?

For example, I have a Mac with 64 GB or RAM. Setting up threadsizemax to 30 GB would work as long as only 2 threads increase to 30 GB. What happens if a third thread tries to increase its stack? I guess this will generate a "Memory is full" or "No more memory available" error. Right?

And what if a thread terminates? Will its stack be freed, allocating more memory for other threads?

Thank you to confirm or not the way threadsizemax works.

Jean-Luc