Static vs Dynamic memory allocation

Feb 27, 2013 at 5:47pm
Hi,
I was just curious if there is a performance difference (e.g access time, speed, ...) between allocating static memory vs dynamic memory?
For example, if am reading data from a file, and storing them inside a huge buffer, what would be the differences between storing these data inside a static buffer vs a dynamic one?

Thanks,
--Rudy
Feb 27, 2013 at 8:48pm
If you declare a huge buffer as a static array you can cause a stack overflow.
You should never store big amounts of data in the stack.
Feb 27, 2013 at 8:52pm
Topic archived. No new replies allowed.