Pretty sure that it’s something a long the lines of “stack begins high, grows down, while heap behind low grows high” when they meet, it’s a stack overflow
TL;DR: For historical reasons stacks growing down is defined in hardware on some CPUs (notably x86). On other CPUs like some ARM chips for example you (or more likely your compiler’s developer) can technically choose which direction stacks go but not conforming to the historical standard is the choice of a madman.
Haven’t heard of the stack address thing, anyone got a TLDR on the topic?
Pretty sure that it’s something a long the lines of “stack begins high, grows down, while heap behind low grows high” when they meet, it’s a stack overflow
They don’t have to meet, the max stack size is defined at compile time
https://softwareengineering.stackexchange.com/questions/386194/why-do-we-still-grow-the-stack-backwards
TL;DR: For historical reasons stacks growing down is defined in hardware on some CPUs (notably x86). On other CPUs like some ARM chips for example you (or more likely your compiler’s developer) can technically choose which direction stacks go but not conforming to the historical standard is the choice of a madman.
Dynamic stacks are pretty common in the most popular scripting languages, but considered bad practice from folks who use systems languages