Subroutine calls in the ancient world, before computers had stacks or heaps
devblogs.microsoft.com
Subroutine calls in the ancient world, before computers had stacks or heaps
1–10 of 241 posts
Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#2* giving rise to "BUGS AND LIMITATIONS"
Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#3Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#4Note that before we had arbitrarily extensible heaps, programmers always did at least a little engineering, in that they had to consider the probable distribution of inputs and size* all their intermediate storage appropriately. * giving rise to "BUGS AND LIMITATIONS "
But knowing the bounds of memory consumption used to be normal for application programmers, too. I mean, you don't want to run out of memory. Ever. What do people do now, just YOLO memory usage?
Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#5Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#6While seemingly obsolete, there are a ton of pre-heap / pre-stack algorithms for dynamically changing arrays or other data structures.
The book also builds up to garbage collection and how to implements Lisp-lists. The kind of encyclopedic knowledge you'd expect from Knuth.
-------
One of my favorites is how to have two Arrays dynamically take up one space.
Have one array grow normally from location#0, and the second array grow backwards from location#End.
Now both arrays take up the statically allocated space efficiently sharing.
This can be extended to an arbitrary number of arrays, but at that point you might as well use Malloc and Realloc. Or at least, the techniques therein are really close to a malloc-like routine IMO.
Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#7Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#8Am I the only one who read it as the ancient world before computers existed had stacks or heaps? English is so weird sometimes...
Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#9Am I the only one who read it as the ancient world before computers existed had stacks or heaps? English is so weird sometimes...
Re: Subroutine calls in the ancient world, before computers had stacks or heaps
#10Am I the only one who read it as the ancient world before computers existed had stacks or heaps? English is so weird sometimes...