LinuxGuruz
  • Last 5 Forum Topics
    Replies
    Views
    Last post


The Web Only This Site
  • BOOKMARK

  • ADD TO FAVORITES

  • REFERENCES


  • MARC

    Mailing list ARChives
    - Search by -
     Subjects
     Authors
     Bodies





    FOLDOC

    Computing Dictionary




  • Text Link Ads






  • LINUX man pages
  • Linux Man Page Viewer


    The following form allows you to view linux man pages.

    Command:

    alloca

    
    
    

    SYNOPSIS

           #include <alloca.h>
    
           void *alloca(size_t size);
    
    
    

    DESCRIPTION

           The  alloca() function allocates size bytes of space in the stack frame
           of the caller.  This temporary space is automatically  freed  when  the
           function that called alloca() returns to its caller.
    
    
    

    RETURN VALUE

           The  alloca()  function returns a pointer to the beginning of the allo-
           cated space.  If the allocation causes stack overflow, program behavior
           is undefined.
    
    
    

    ATTRIBUTES

       Multithreading (see pthreads(7))
           The alloca() function is thread-safe.
    
    
    

    CONFORMING TO

           This function is not in POSIX.1-2001.
    
           There  is  evidence  that  the  alloca() function appeared in 32V, PWB,
           PWB.2, 3BSD, and 4BSD.  There is a man page for it  in  4.3BSD.   Linux
           uses the GNU version.
    
    
    

    NOTES

           The  alloca() function is machine- and compiler-dependent.  For certain
           applications, its use can improve efficiency compared  to  the  use  of
           malloc(3)  plus free(3).  In certain cases, it can also simplify memory
           deallocation in applications  that  use  longjmp(3)  or  siglongjmp(3).
           Otherwise, its use is discouraged.
    
           Because  the  space allocated by alloca() is allocated within the stack
           frame, that space is automatically freed  if  the  function  return  is
           jumped over by a call to longjmp(3) or siglongjmp(3).
    
           Do not attempt to free(3) space allocated by alloca()!
    
       Notes on the GNU version
           Normally,  gcc(1) translates calls to alloca() with inlined code.  This
           is not done when either the -ansi, -std=c89, -std=c99, or the  -std=c11
           option  is  given and the header <alloca.h> is not included.  Otherwise
           (without an -ansi or -std=c* option) the glibc  version  of  <stdlib.h>
           includes <alloca.h> and that contains the lines:
    
               #ifdef  __GNUC__
               #define alloca(size)   __builtin_alloca (size)
               #endif
    
           with  messy consequences if one has a private version of this function.
    
           a  function  call,  because  the stack space reserved by alloca() would
           appear on the stack in the middle of the space for the  function  argu-
           ments.
    
    
    

    SEE ALSO

           brk(2), longjmp(3), malloc(3)
    
    
    

    GNU 2013-10-07 ALLOCA(3)

    
    
  • MORE RESOURCE


  • Linux

    The Distributions





    Linux

    The Software





    Linux

    The News



  • MARKETING






  • Toll Free

webmaster@linuxguruz.com
Copyright © 1999 - 2016 by LinuxGuruz