Hello,

I was under the impression that in C you could not do something like:

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

Reply via email to