GNU Info

Info Node: (libc.info)Disadvantages of Alloca

(libc.info)Disadvantages of Alloca


Next: GNU C Variable-Size Arrays Prev: Advantages of Alloca Up: Variable Size Automatic
Enter node , (file) or (file)node

Disadvantages of `alloca'
.........................

   These are the disadvantages of `alloca' in comparison with `malloc':

   * If you try to allocate more memory than the machine can provide,
     you don't get a clean error message.  Instead you get a fatal
     signal like the one you would get from an infinite recursion;
     probably a segmentation violation (Note: Program Error Signals).

   * Some non-GNU systems fail to support `alloca', so it is less
     portable.  However, a slower emulation of `alloca' written in C is
     available for use on systems with this deficiency.


automatically generated by info2www version 1.2.2.9