I thought the memory cost of threads was more of a JVM thing (default 1mb stack) than an OS thing (pages that aren't mapped/resident don't cost much).
What's the cost to the kernel besides a few structs?
What's the cost to the kernel besides a few structs?
Can you force yourself to list a few disadvantages of virtual threads over native threads?
A nitpick, and a possible optimization opportunity.
If there are any unmasked signal handlers not using SA_ONSTACK, the OS can reasonably assume the thread doesn't care about memory below sp - redzone (redzone is 128 bytes on AMD64) and therefore there would be no harm in reclaiming it.