On Thu, Sep 29, 2011 at 1:52 PM, Sergio Campamá <sergiocamp...@gmail.com>wrote:
> Hello,
>
> I was under the impression that in C you could not do something like:
>
VLA was illegal in the original ANSI/ISO C (C90), has been a gcc extension
for years, and is allowed in C99. It is implemented in gcc as a stack
pointer adjustment.
Peter
>
> void func(int size)
> {
> int array[size];
> //something
> return;
> }
>
> But a friend of mine just proved me wrong, using mspgcc... Searching around
> we found this to be VLA (variable length array) Does this kind of usage
> fall
> into dynamic memory? My impression is that the answer is yes, and therefore
> it shouldn't be used on microprocessors, because malloc can cause havoc (as
> someone told me some emails ago in this very same group).
>
> What are your thoughts on VLA? Does it use malloc internally, and therefore
> should be avoided?
> --
> --------------------------------------
> Sergio Campamá
> sergiocamp...@gmail.com
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users