C stack / heap!?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

Im looking for a more precise answer! ;)

If I do this for example:

int A[12];

int main()
{
   int i = 0;
    for( i =0; i < 12; i++)
         A[i] = i+1;
   return 0;
}



int main()
{
int A[12];
   int i = 0;
    for( i =0; i < 12; i++)
         A[i] = i+1;
   return 0;
}



where on the stack does A go? and which is faster?

I wanted to implement a ring buffer in C? but Im wondering if its faster to put the ring buffer array global or in a struct, or even into a c++ object?
for example the boost circular ( ring buffers )....

this is a general question... feel free to critique .... :P

L

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux