News for hackers. Stuff that matters.
Re:Ask HN: Who had the crazy idea to make the stack grow down? by GianFabien on Saturday September 27, 2025 @11:15PM (#45401465)
Back a long time ago, before GB memories and MMUs, the executable code was loaded at low addresses, statically allocated data followed, then dynamically allocated memory (heap). So stack was placed at the very top of memory and grew down. When heap and stack collided it signaled an out of memory situation.
Re:Ask HN: Who had the crazy idea to make the stack grow down? by bjourne on Sunday September 28, 2025 @03:04PM (#45406944)
To detect collisions you'd need write-protected memory. Afaik, most computers from the era you are thinking of did not have write-protected memory.
Re:Ask HN: Who had the crazy idea to make the stack grow down? by bobby_mcbrown on Wednesday October 01, 2025 @01:56AM (#45434719)
makes sense