All the diagrams that show the stack "above" the heap may be an example of a widespread "UNIX-ism"; and indeed, there are many questions on StackOverflow and the like from semi-confused beginners wondering why they see heap allocations having higher addresses than ones on the stack.
In Windows, stacks are usually very low in memory, even below the process image itself (which is normally loaded at 4MB[1]), and heaps are above. Of course, if you have many threads, stack and heap ranges can end up anywhere, but in the simplest single-thread case the layout is already very different from the "classic" image-heap-stack order.
In Windows, stacks are usually very low in memory, even below the process image itself (which is normally loaded at 4MB[1]), and heaps are above. Of course, if you have many threads, stack and heap ranges can end up anywhere, but in the simplest single-thread case the layout is already very different from the "classic" image-heap-stack order.
[1]https://devblogs.microsoft.com/oldnewthing/20141003-00/?p=43...