Variable-length Array - Memory Allocation

Memory Allocation

One problem that may be hidden by a language's support for VLAs is that of the underlying memory allocation: in environments where there is a clear distinction between a heap and a stack, it may not be clear which, if any, of those will store the VLA.

For example, the GNU C Compiler allocates memory for VLAs on the stack. VLAs, like all objects in C, are limited to SIZE_MAX bytes.

Read more about this topic:  Variable-length Array

Famous quotes containing the word memory:

    Why is it that we have enough memory to recollect the most minute circumstances of something that has happened to us, but not enough to remember how many times we have recounted them to the same person?
    François, Duc De La Rochefoucauld (1613–1680)