So, I recently came across a lisper writing an "X Considered Harmful"
post about automatic garbage collection. It is not a viewpoint I agree
with, but it did make me think about exercising more control of
allocation in Common Lisp. One of stranger things I thought of was
declaring just about everything dynamic-extent and (almost) never
returning: explicitly managing the pool of stack allocated memory. Could
such such a scheme be practical?
Matt
--
The better part of valor is discretion.
-- William Shakespeare, "Henry IV"
In article <······················@newsfe15.iad>,
Matthew D Swank <··················@gmail.com> wrote:
> So, I recently came across a lisper writing an "X Considered Harmful"
> post about automatic garbage collection. It is not a viewpoint I agree
> with, but it did make me think about exercising more control of
> allocation in Common Lisp. One of stranger things I thought of was
> declaring just about everything dynamic-extent and (almost) never
> returning: explicitly managing the pool of stack allocated memory. Could
> such such a scheme be practical?
Intuitively it doesn't feel like it, but this may be one of those things
where intuition is misleading.
But I wonder if it can really be practical for large data structures.
For instance, if you're writing an editor, would you really keep all the
buffers on the stack?
--
Barry Margolin, ······@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
On May 29, 10:03 pm, Matthew D Swank <··················@gmail.com>
wrote:
> So, I recently came across a lisper writing an "X Considered Harmful"
> post about automatic garbage collection. It is not a viewpoint I agree
> with, but it did make me think about exercising more control of
> allocation in Common Lisp. One of stranger things I thought of was
> declaring just about everything dynamic-extent and (almost) never
> returning: explicitly managing the pool of stack allocated memory. Could
> such such a scheme be practical?
>
> Matt
> --
> The better part of valor is discretion.
> -- William Shakespeare, "Henry IV"
I think we should have more interesting threads asking questions about
things like this.
I have some questions:
How do you know how much stack-allocated memory you have at a certain
time?
How do you increase the amount of stack allocated-memory when you are
low?
I feel like an important point of Cheney on the MTA is that you can
use malloc to add memory to your stack when you need it. I'm not sure
how you'd do this with a regular lisp implementation...
Would tail call optimization screw this up?
You may have to explicitly declare things notinline as well...