Re: alloca / _alloca / dynamic stack memory
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Thu, 8 Mar 2007 00:17:14 -0500
"Michael Crawley" <Michael Crawley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:3EFCAF3F-7BF3-4641-AE18-0488FB97D545@xxxxxxxxxxxxx
The
most popular is alloca(size_t), which is not found in the default
libraries of many C++ compilers. If I am not mistaken, I do not
believe VS 2003 had it, but VS 2005 has it.
_alloca (with leading underscore) has been there since at least VC6.
It is my understanding
that developers can invoke alloca(size_t) to allocate memory on the
stack and pass the allocated memory reference as a parameter into
placement new.
Why not just declare a local variable? It would go on the stack, and
would be constructed and destroyed automatically.
What exactly are you trying to achieve? I'm missing the point of the
exercise.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: alloca / _alloca / dynamic stack memory
- From: Ben Voigt
- Re: alloca / _alloca / dynamic stack memory
- Prev by Date: Re: c++ delete operator parameters
- Next by Date: calculate throughputs within overlapped I/O and multithread
- Previous by thread: Re: c++ delete operator parameters
- Next by thread: Re: alloca / _alloca / dynamic stack memory
- Index(es):
Relevant Pages
|
Loading