digitalmars.D - alloca and GC
- Carlos Santander B. (4/4) Nov 21 2004 Is memory assigned by alloca garbage collected? Because std.process uses...
- Dave (3/7) Nov 21 2004 Check this out:
-
Carlos Santander B.
(21/21)
Nov 22 2004
"Dave"
escribió en el mensaje - Ilya Minkov (8/10) Nov 22 2004 Alloca allocates memory using stack pointer increment. This memory is
- Ilya Minkov (3/4) Nov 22 2004 ARGH, decrement, not increment. Because stack grows top-down.
- Simon Buchan (6/10) Nov 22 2004 Most of the time :D. It is _possible_ to get it to grow up, I believe,
Is memory assigned by alloca garbage collected? Because std.process uses alloca, but doesn't use free. ----------------------- Carlos Santander Bernal
Nov 21 2004
In article <cnrkh1$fo2$1 digitaldaemon.com>, Carlos Santander B. says...Is memory assigned by alloca garbage collected? Because std.process uses alloca, but doesn't use free. ----------------------- Carlos Santander BernalCheck this out: http://www.rt.com/man/alloca.3.html
Nov 21 2004
"Dave" <Dave_member pathlink.com> escribió en el mensaje news:cnrq0b$o40$1 digitaldaemon.com... | In article <cnrkh1$fo2$1 digitaldaemon.com>, Carlos Santander B. says... | > | >Is memory assigned by alloca garbage collected? Because std.process uses alloca, | >but doesn't use free. | > | >----------------------- | >Carlos Santander Bernal | > | > | | Check this out: | | http://www.rt.com/man/alloca.3.html | | Thanks, Dave and Ilya. ----------------------- Carlos Santander Bernal
Nov 22 2004
Carlos Santander B. schrieb:Is memory assigned by alloca garbage collected? Because std.process uses alloca, but doesn't use free.Alloca allocates memory using stack pointer increment. This memory is reclaimed when you return from a function and the stack pointer is set back to what it was. Alloca is the fastest way to allocate memory. Another funny thing is, since stack is a GC root, the memory you get using alloca also is - so it is safe to store pointers to GCed memory there as well. -eye
Nov 22 2004
Ilya Minkov schrieb:Alloca allocates memory using stack pointer increment. This memory isARGH, decrement, not increment. Because stack grows top-down. -eye.
Nov 22 2004
On Mon, 22 Nov 2004 17:18:04 +0100, Ilya Minkov <minkov cs.tum.edu> wrote:Ilya Minkov schrieb:Most of the time :D. It is _possible_ to get it to grow up, I believe, and don't quote me on it, but I suspect other architectures have their own conventions. -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/Alloca allocates memory using stack pointer increment. This memory isARGH, decrement, not increment. Because stack grows top-down. -eye.
Nov 22 2004