Re: heap allocation of arrays
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Mon, 19 Jun 2006 12:37:57 -0700
Jugoslav Dujic wrote:
(snip regarding heap vs. stack allocation)
I recall a discussion on Intel Forum regarding a suggestion of
an "opposite" feature -- make ALLOCATABLE arrays to be allocated on the stack if they fit, for efficiency reasons. As Steve explained
then, it's not easy to get the top of the stack on Windows, so it
wasn't quite feasible thing to do.
There is a non-standard C library function alloca() for stack
allocation of dynamic arrays in C. The main advantage is not
having to remember to free() them. I never use it because it
is not be available on all systems.
-- glen
.
- Follow-Ups:
- Re: heap allocation of arrays
- From: David Frank
- Re: heap allocation of arrays
- References:
- heap allocation of arrays
- From: robert . corbett
- Re: heap allocation of arrays
- From: Jugoslav Dujic
- heap allocation of arrays
- Prev by Date: Re: heap allocation of arrays
- Next by Date: Re: Windows/Dos memory -- when is Allocate/Deallocate necessary
- Previous by thread: Re: heap allocation of arrays
- Next by thread: Re: heap allocation of arrays
- Index(es):
Relevant Pages
|