I hope someday we can stop thinking of "stack" and "heap" as the two fundamentally different modes of memory allocation and instead reframe memory allocation as a continuum of strategies, from bump allocation to segregated fit to best fit to compacting, etc.
-
-
Great hack Larceny Scheme taught me: stack and nursery are just two ends of a memory block, both bump allocating towards the other. When they hit (or when you call/cc), it reformats the stack frames **in place** to look like heap objects (& then initiates GC into to-space)!
-
(Of course this yields a two-pass system: the first pass reformats the frames and the second copies them all to the to-space, since the whole stack is going to be live. But it does mean the code for copying objects can be very uniform.)
End of conversation
New conversation -
-
-
If you go with generational strategies, you'll just spend your time talking about how to deal with non-generational allocation. First thing will be allocation pools to send objects directly to gen2.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Call it a stack if you bump allocate and deallocate from it without any kind of synchronization imho. Even if it gets compacted / moved when the coroutine suspends or something.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Seems much more well-known in Scheme and [Standard] ML circles. Would also be good if someday all languages are implemented with proper tail calls.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.