Per https://www.freepascal.org/docs-html/rtl/system/beginthread.html each thread is default allocated a 4Mbi stack. For my needs that is way over the top - I'll look to reducing it to 16KB or so.
(Examining the assembler code there are no calls other than interlocks, random, sleep and gettickcount64 - 2 KB is probably more than ample).
(Per another doc, it's allocated a stack of a size defined by the OS ...).
In the general case: assume that those statements are subject to copy-on-write and demand-paging facilities of the architecture and OS.
You will probably find that a 4Mb allocation means that 4Mb of contiguous address space is being allocated to that stack, not that 4Mb of actual physical RAM (i.e. stuff on chips) is comitted.
And that 4Mb portion of address space will be going through at least one level of page-table translation, with the possibility that some of the page tables aren't set up until they're actually needed... the detail will be highly architecture and OS-specific.
I'm not saying I like it. At a minimum, the people who decided that it was safe to allocate such enormous chunks of address space are repeating the same mistake that the Windows NT designers made when they assumed that a 2Gb address space was adequate for application programs... OTOH, those old fogeys are probably retired by now and what did they know? And of the '286 designers who assumed that 8+8K descriptors would never be restrictive. And for that matter they're repeating the mistake of the IBM PC designers who assumed that 640Kb was enough for the OS and a single running program... on the basis that it was ten times the maximum possible memory capacity of an Apple-II. The World moves in strange ways :-)
MarkMLl