pike.git / src / alloca.c

version» Context lines:

pike.git/src/alloca.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: alloca.c,v 1.2 1998/03/28 15:41:04 grubba Exp $ +  * $Id: alloca.c,v 1.3 1999/01/31 09:01:38 hubbe Exp $    */   #include <stdio.h>   /*    alloca -- (mostly) portable public-domain implementation -- D A Gwyn       last edit: 86/05/30 rms    include config.h, since on VMS it renames some symbols.    Use xmalloc instead of malloc.       This implementation of the PWB library alloca() function,
pike.git/src/alloca.c:133:    {    union hdr *next; /* for chaining headers */    char *deep; /* for stack depth measure */    } h;   } header;      /*    alloca( size ) returns a pointer to at least `size' bytes of    storage which will be automatically reclaimed upon exit from    the procedure that called alloca(). Originally, this space -  was supposed to be taken from the current stack frame of the +  was supposed to be taken from the current stack pike_frame of the    caller, but that method cannot be made to work for some    implementations of C, for example under Gould's UTX/32.   */      static header *last_alloca_header = NULL; /* -> last alloca header */      pointer   alloca (size) /* returns pointer to storage */    unsigned size; /* # bytes to allocate */   {