Re: Mutable reference to a structure field

From: Joe Marshall (prunesquallor_at_comcast.net)
Date: 06/19/04


Date: Sat, 19 Jun 2004 00:55:22 GMT

Alex Drummond <a.drummond@ucl.ac.uk> writes:

> I'm a bit confused about this now. Surely if I (say) created a big
> list of closures, that would have to take up some stack space? Isn't
> the environment that the closure captures stored on the stack in some
> way?

They would more likely be stored in the heap. If the compiler
determines that a closure is needed, it arranges to move the stack
allocated variables to the heap.

-- 
~jrm


Relevant Pages

  • Re: Groovy (war Re: [PROST]Re: CDC Plugin fuer Eclipse)
    ... Warum müsste man continuations erlauben Stackvariablen in den Heap zu verschieben? ... Ein activation record speichert die Parameter und lokalen Variablen der Funktion und eine Information, ... Da diese activation records klassischerweise auf einem Stack verwaltet werden, kann man hier Stackspace sparen - Endrekursion ist damit genauso effizient wie eine klassische Iteration mit einem Sprung. ...
    (de.comp.lang.java)
  • Re: How come Ada isnt more popular?
    ... Object orientation w/o indeterminable scopes, upward ... which is toward the TOP of the call stack. ... still has closure. ... how things should work) and what is presently called downwards closure ...
    (comp.lang.ada)
  • Re: How come Ada isnt more popular?
    ... the stack to the heap. ... still has closure. ... upward, of you prefer), then people say it supports "full closures". ... place (whether inward only, ...
    (comp.lang.ada)
  • Re: How come Ada isnt more popular?
    ... the stack to the heap. ... still has closure. ... upward, of you prefer), then people say it supports "full closures". ... place (whether inward only, ...
    (comp.lang.ada)
  • Re: Environment "Aha"
    ... hashtable (environment) is created to hold the bindings. ... except that only a "sufficiently smart compiler " will ... at which point the heap seems to be the most natural place. ... Your example never creates a closure. ...
    (comp.lang.lisp)