Blame lib/alloca.c

Packit 8f70b4
/* alloca.c -- allocate automatically reclaimed memory
Packit 8f70b4
   (Mostly) portable public-domain implementation -- D A Gwyn
Packit 8f70b4
Packit 8f70b4
   This implementation of the PWB library alloca function,
Packit 8f70b4
   which is used to allocate space off the run-time stack so
Packit 8f70b4
   that it is automatically reclaimed upon procedure exit,
Packit 8f70b4
   was inspired by discussions with J. Q. Johnson of Cornell.
Packit 8f70b4
   J.Otto Tennant <jot@cray.com> contributed the Cray support.
Packit 8f70b4
Packit 8f70b4
   There are some preprocessor constants that can
Packit 8f70b4
   be defined when compiling for your specific system, for
Packit 8f70b4
   improved efficiency; however, the defaults should be okay.
Packit 8f70b4
Packit 8f70b4
   The general concept of this implementation is to keep
Packit 8f70b4
   track of all alloca-allocated blocks, and reclaim any
Packit 8f70b4
   that are found to be deeper in the stack than the current
Packit 8f70b4
   invocation.  This heuristic does not reclaim storage as
Packit 8f70b4
   soon as it becomes invalid, but it will do so eventually.
Packit 8f70b4
Packit 8f70b4
   As a special case, alloca(0) reclaims storage without
Packit 8f70b4
   allocating any.  It is a good idea to use alloca(0) in
Packit 8f70b4
   your main control loop, etc. to force garbage collection.  */
Packit 8f70b4
Packit 8f70b4
#include <config.h>
Packit 8f70b4
Packit 8f70b4
#include <alloca.h>
Packit 8f70b4
Packit 8f70b4
#include <string.h>
Packit 8f70b4
#include <stdlib.h>
Packit 8f70b4
Packit 8f70b4
#ifdef emacs
Packit 8f70b4
# include "lisp.h"
Packit 8f70b4
# include "blockinput.h"
Packit 8f70b4
# ifdef EMACS_FREE
Packit 8f70b4
#  undef free
Packit 8f70b4
#  define free EMACS_FREE
Packit 8f70b4
# endif
Packit 8f70b4
#else
Packit 8f70b4
# define memory_full() abort ()
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
/* If compiling with GCC 2, this file's not needed.  */
Packit 8f70b4
#if !defined (__GNUC__) || __GNUC__ < 2
Packit 8f70b4
Packit 8f70b4
/* If someone has defined alloca as a macro,
Packit 8f70b4
   there must be some other way alloca is supposed to work.  */
Packit 8f70b4
# ifndef alloca
Packit 8f70b4
Packit 8f70b4
#  ifdef emacs
Packit 8f70b4
#   ifdef static
Packit 8f70b4
/* actually, only want this if static is defined as ""
Packit 8f70b4
   -- this is for usg, in which emacs must undefine static
Packit 8f70b4
   in order to make unexec workable
Packit 8f70b4
   */
Packit 8f70b4
#    ifndef STACK_DIRECTION
Packit 8f70b4
you
Packit 8f70b4
lose
Packit 8f70b4
-- must know STACK_DIRECTION at compile-time
Packit 8f70b4
/* Using #error here is not wise since this file should work for
Packit 8f70b4
   old and obscure compilers.  */
Packit 8f70b4
#    endif /* STACK_DIRECTION undefined */
Packit 8f70b4
#   endif /* static */
Packit 8f70b4
#  endif /* emacs */
Packit 8f70b4
Packit 8f70b4
/* If your stack is a linked list of frames, you have to
Packit 8f70b4
   provide an "address metric" ADDRESS_FUNCTION macro.  */
Packit 8f70b4
Packit 8f70b4
#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
Packit 8f70b4
long i00afunc ();
Packit 8f70b4
#   define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
Packit 8f70b4
#  else
Packit 8f70b4
#   define ADDRESS_FUNCTION(arg) &(arg)
Packit 8f70b4
#  endif
Packit 8f70b4
Packit 8f70b4
/* Define STACK_DIRECTION if you know the direction of stack
Packit 8f70b4
   growth for your system; otherwise it will be automatically
Packit 8f70b4
   deduced at run-time.
Packit 8f70b4
Packit 8f70b4
   STACK_DIRECTION > 0 => grows toward higher addresses
Packit 8f70b4
   STACK_DIRECTION < 0 => grows toward lower addresses
Packit 8f70b4
   STACK_DIRECTION = 0 => direction of growth unknown  */
Packit 8f70b4
Packit 8f70b4
#  ifndef STACK_DIRECTION
Packit 8f70b4
#   define STACK_DIRECTION      0       /* Direction unknown.  */
Packit 8f70b4
#  endif
Packit 8f70b4
Packit 8f70b4
#  if STACK_DIRECTION != 0
Packit 8f70b4
Packit 8f70b4
#   define STACK_DIR    STACK_DIRECTION /* Known at compile-time.  */
Packit 8f70b4
Packit 8f70b4
#  else /* STACK_DIRECTION == 0; need run-time code.  */
Packit 8f70b4
Packit 8f70b4
static int stack_dir;           /* 1 or -1 once known.  */
Packit 8f70b4
#   define STACK_DIR    stack_dir
Packit 8f70b4
Packit 8f70b4
static int
Packit 8f70b4
find_stack_direction (int *addr, int depth)
Packit 8f70b4
{
Packit 8f70b4
  int dir, dummy = 0;
Packit 8f70b4
  if (! addr)
Packit 8f70b4
    addr = &dummy;
Packit 8f70b4
  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
Packit 8f70b4
  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
Packit 8f70b4
  return dir + dummy;
Packit 8f70b4
}
Packit 8f70b4
Packit 8f70b4
#  endif /* STACK_DIRECTION == 0 */
Packit 8f70b4
Packit 8f70b4
/* An "alloca header" is used to:
Packit 8f70b4
   (a) chain together all alloca'ed blocks;
Packit 8f70b4
   (b) keep track of stack depth.
Packit 8f70b4
Packit 8f70b4
   It is very important that sizeof(header) agree with malloc
Packit 8f70b4
   alignment chunk size.  The following default should work okay.  */
Packit 8f70b4
Packit 8f70b4
#  ifndef       ALIGN_SIZE
Packit 8f70b4
#   define ALIGN_SIZE   sizeof(double)
Packit 8f70b4
#  endif
Packit 8f70b4
Packit 8f70b4
typedef union hdr
Packit 8f70b4
{
Packit 8f70b4
  char align[ALIGN_SIZE];       /* To force sizeof(header).  */
Packit 8f70b4
  struct
Packit 8f70b4
    {
Packit 8f70b4
      union hdr *next;          /* For chaining headers.  */
Packit 8f70b4
      char *deep;               /* For stack depth measure.  */
Packit 8f70b4
    } h;
Packit 8f70b4
} header;
Packit 8f70b4
Packit 8f70b4
static header *last_alloca_header = NULL;       /* -> last alloca header.  */
Packit 8f70b4
Packit 8f70b4
/* Return a pointer to at least SIZE bytes of storage,
Packit 8f70b4
   which will be automatically reclaimed upon exit from
Packit 8f70b4
   the procedure that called alloca.  Originally, this space
Packit 8f70b4
   was supposed to be taken from the current stack frame of the
Packit 8f70b4
   caller, but that method cannot be made to work for some
Packit 8f70b4
   implementations of C, for example under Gould's UTX/32.  */
Packit 8f70b4
Packit 8f70b4
void *
Packit 8f70b4
alloca (size_t size)
Packit 8f70b4
{
Packit 8f70b4
  auto char probe;              /* Probes stack depth: */
Packit 8f70b4
  register char *depth = ADDRESS_FUNCTION (probe);
Packit 8f70b4
Packit 8f70b4
#  if STACK_DIRECTION == 0
Packit 8f70b4
  if (STACK_DIR == 0)           /* Unknown growth direction.  */
Packit 8f70b4
    STACK_DIR = find_stack_direction (NULL, (size & 1) + 20);
Packit 8f70b4
#  endif
Packit 8f70b4
Packit 8f70b4
  /* Reclaim garbage, defined as all alloca'd storage that
Packit 8f70b4
     was allocated from deeper in the stack than currently.  */
Packit 8f70b4
Packit 8f70b4
  {
Packit 8f70b4
    register header *hp;        /* Traverses linked list.  */
Packit 8f70b4
Packit 8f70b4
#  ifdef emacs
Packit 8f70b4
    BLOCK_INPUT;
Packit 8f70b4
#  endif
Packit 8f70b4
Packit 8f70b4
    for (hp = last_alloca_header; hp != NULL;)
Packit 8f70b4
      if ((STACK_DIR > 0 && hp->h.deep > depth)
Packit 8f70b4
          || (STACK_DIR < 0 && hp->h.deep < depth))
Packit 8f70b4
        {
Packit 8f70b4
          register header *np = hp->h.next;
Packit 8f70b4
Packit 8f70b4
          free (hp);            /* Collect garbage.  */
Packit 8f70b4
Packit 8f70b4
          hp = np;              /* -> next header.  */
Packit 8f70b4
        }
Packit 8f70b4
      else
Packit 8f70b4
        break;                  /* Rest are not deeper.  */
Packit 8f70b4
Packit 8f70b4
    last_alloca_header = hp;    /* -> last valid storage.  */
Packit 8f70b4
Packit 8f70b4
#  ifdef emacs
Packit 8f70b4
    UNBLOCK_INPUT;
Packit 8f70b4
#  endif
Packit 8f70b4
  }
Packit 8f70b4
Packit 8f70b4
  if (size == 0)
Packit 8f70b4
    return NULL;                /* No allocation required.  */
Packit 8f70b4
Packit 8f70b4
  /* Allocate combined header + user data storage.  */
Packit 8f70b4
Packit 8f70b4
  {
Packit 8f70b4
    /* Address of header.  */
Packit 8f70b4
    register header *new;
Packit 8f70b4
Packit 8f70b4
    size_t combined_size = sizeof (header) + size;
Packit 8f70b4
    if (combined_size < sizeof (header))
Packit 8f70b4
      memory_full ();
Packit 8f70b4
Packit 8f70b4
    new = malloc (combined_size);
Packit 8f70b4
Packit 8f70b4
    if (! new)
Packit 8f70b4
      memory_full ();
Packit 8f70b4
Packit 8f70b4
    new->h.next = last_alloca_header;
Packit 8f70b4
    new->h.deep = depth;
Packit 8f70b4
Packit 8f70b4
    last_alloca_header = new;
Packit 8f70b4
Packit 8f70b4
    /* User storage begins just after header.  */
Packit 8f70b4
Packit 8f70b4
    return (void *) (new + 1);
Packit 8f70b4
  }
Packit 8f70b4
}
Packit 8f70b4
Packit 8f70b4
#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
Packit 8f70b4
Packit 8f70b4
#   ifdef DEBUG_I00AFUNC
Packit 8f70b4
#    include <stdio.h>
Packit 8f70b4
#   endif
Packit 8f70b4
Packit 8f70b4
#   ifndef CRAY_STACK
Packit 8f70b4
#    define CRAY_STACK
Packit 8f70b4
#    ifndef CRAY2
Packit 8f70b4
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
Packit 8f70b4
struct stack_control_header
Packit 8f70b4
  {
Packit 8f70b4
    long shgrow:32;             /* Number of times stack has grown.  */
Packit 8f70b4
    long shaseg:32;             /* Size of increments to stack.  */
Packit 8f70b4
    long shhwm:32;              /* High water mark of stack.  */
Packit 8f70b4
    long shsize:32;             /* Current size of stack (all segments).  */
Packit 8f70b4
  };
Packit 8f70b4
Packit 8f70b4
/* The stack segment linkage control information occurs at
Packit 8f70b4
   the high-address end of a stack segment.  (The stack
Packit 8f70b4
   grows from low addresses to high addresses.)  The initial
Packit 8f70b4
   part of the stack segment linkage control information is
Packit 8f70b4
   0200 (octal) words.  This provides for register storage
Packit 8f70b4
   for the routine which overflows the stack.  */
Packit 8f70b4
Packit 8f70b4
struct stack_segment_linkage
Packit 8f70b4
  {
Packit 8f70b4
    long ss[0200];              /* 0200 overflow words.  */
Packit 8f70b4
    long sssize:32;             /* Number of words in this segment.  */
Packit 8f70b4
    long ssbase:32;             /* Offset to stack base.  */
Packit 8f70b4
    long:32;
Packit 8f70b4
    long sspseg:32;             /* Offset to linkage control of previous
Packit 8f70b4
                                   segment of stack.  */
Packit 8f70b4
    long:32;
Packit 8f70b4
    long sstcpt:32;             /* Pointer to task common address block.  */
Packit 8f70b4
    long sscsnm;                /* Private control structure number for
Packit 8f70b4
                                   microtasking.  */
Packit 8f70b4
    long ssusr1;                /* Reserved for user.  */
Packit 8f70b4
    long ssusr2;                /* Reserved for user.  */
Packit 8f70b4
    long sstpid;                /* Process ID for pid based multi-tasking.  */
Packit 8f70b4
    long ssgvup;                /* Pointer to multitasking thread giveup.  */
Packit 8f70b4
    long sscray[7];             /* Reserved for Cray Research.  */
Packit 8f70b4
    long ssa0;
Packit 8f70b4
    long ssa1;
Packit 8f70b4
    long ssa2;
Packit 8f70b4
    long ssa3;
Packit 8f70b4
    long ssa4;
Packit 8f70b4
    long ssa5;
Packit 8f70b4
    long ssa6;
Packit 8f70b4
    long ssa7;
Packit 8f70b4
    long sss0;
Packit 8f70b4
    long sss1;
Packit 8f70b4
    long sss2;
Packit 8f70b4
    long sss3;
Packit 8f70b4
    long sss4;
Packit 8f70b4
    long sss5;
Packit 8f70b4
    long sss6;
Packit 8f70b4
    long sss7;
Packit 8f70b4
  };
Packit 8f70b4
Packit 8f70b4
#    else /* CRAY2 */
Packit 8f70b4
/* The following structure defines the vector of words
Packit 8f70b4
   returned by the STKSTAT library routine.  */
Packit 8f70b4
struct stk_stat
Packit 8f70b4
  {
Packit 8f70b4
    long now;                   /* Current total stack size.  */
Packit 8f70b4
    long maxc;                  /* Amount of contiguous space which would
Packit 8f70b4
                                   be required to satisfy the maximum
Packit 8f70b4
                                   stack demand to date.  */
Packit 8f70b4
    long high_water;            /* Stack high-water mark.  */
Packit 8f70b4
    long overflows;             /* Number of stack overflow ($STKOFEN) calls.  */
Packit 8f70b4
    long hits;                  /* Number of internal buffer hits.  */
Packit 8f70b4
    long extends;               /* Number of block extensions.  */
Packit 8f70b4
    long stko_mallocs;          /* Block allocations by $STKOFEN.  */
Packit 8f70b4
    long underflows;            /* Number of stack underflow calls ($STKRETN).  */
Packit 8f70b4
    long stko_free;             /* Number of deallocations by $STKRETN.  */
Packit 8f70b4
    long stkm_free;             /* Number of deallocations by $STKMRET.  */
Packit 8f70b4
    long segments;              /* Current number of stack segments.  */
Packit 8f70b4
    long maxs;                  /* Maximum number of stack segments so far.  */
Packit 8f70b4
    long pad_size;              /* Stack pad size.  */
Packit 8f70b4
    long current_address;       /* Current stack segment address.  */
Packit 8f70b4
    long current_size;          /* Current stack segment size.  This
Packit 8f70b4
                                   number is actually corrupted by STKSTAT to
Packit 8f70b4
                                   include the fifteen word trailer area.  */
Packit 8f70b4
    long initial_address;       /* Address of initial segment.  */
Packit 8f70b4
    long initial_size;          /* Size of initial segment.  */
Packit 8f70b4
  };
Packit 8f70b4
Packit 8f70b4
/* The following structure describes the data structure which trails
Packit 8f70b4
   any stack segment.  I think that the description in 'asdef' is
Packit 8f70b4
   out of date.  I only describe the parts that I am sure about.  */
Packit 8f70b4
Packit 8f70b4
struct stk_trailer
Packit 8f70b4
  {
Packit 8f70b4
    long this_address;          /* Address of this block.  */
Packit 8f70b4
    long this_size;             /* Size of this block (does not include
Packit 8f70b4
                                   this trailer).  */
Packit 8f70b4
    long unknown2;
Packit 8f70b4
    long unknown3;
Packit 8f70b4
    long link;                  /* Address of trailer block of previous
Packit 8f70b4
                                   segment.  */
Packit 8f70b4
    long unknown5;
Packit 8f70b4
    long unknown6;
Packit 8f70b4
    long unknown7;
Packit 8f70b4
    long unknown8;
Packit 8f70b4
    long unknown9;
Packit 8f70b4
    long unknown10;
Packit 8f70b4
    long unknown11;
Packit 8f70b4
    long unknown12;
Packit 8f70b4
    long unknown13;
Packit 8f70b4
    long unknown14;
Packit 8f70b4
  };
Packit 8f70b4
Packit 8f70b4
#    endif /* CRAY2 */
Packit 8f70b4
#   endif /* not CRAY_STACK */
Packit 8f70b4
Packit 8f70b4
#   ifdef CRAY2
Packit 8f70b4
/* Determine a "stack measure" for an arbitrary ADDRESS.
Packit 8f70b4
   I doubt that "lint" will like this much.  */
Packit 8f70b4
Packit 8f70b4
static long
Packit 8f70b4
i00afunc (long *address)
Packit 8f70b4
{
Packit 8f70b4
  struct stk_stat status;
Packit 8f70b4
  struct stk_trailer *trailer;
Packit 8f70b4
  long *block, size;
Packit 8f70b4
  long result = 0;
Packit 8f70b4
Packit 8f70b4
  /* We want to iterate through all of the segments.  The first
Packit 8f70b4
     step is to get the stack status structure.  We could do this
Packit 8f70b4
     more quickly and more directly, perhaps, by referencing the
Packit 8f70b4
     $LM00 common block, but I know that this works.  */
Packit 8f70b4
Packit 8f70b4
  STKSTAT (&status);
Packit 8f70b4
Packit 8f70b4
  /* Set up the iteration.  */
Packit 8f70b4
Packit 8f70b4
  trailer = (struct stk_trailer *) (status.current_address
Packit 8f70b4
                                    + status.current_size
Packit 8f70b4
                                    - 15);
Packit 8f70b4
Packit 8f70b4
  /* There must be at least one stack segment.  Therefore it is
Packit 8f70b4
     a fatal error if "trailer" is null.  */
Packit 8f70b4
Packit 8f70b4
  if (trailer == 0)
Packit 8f70b4
    abort ();
Packit 8f70b4
Packit 8f70b4
  /* Discard segments that do not contain our argument address.  */
Packit 8f70b4
Packit 8f70b4
  while (trailer != 0)
Packit 8f70b4
    {
Packit 8f70b4
      block = (long *) trailer->this_address;
Packit 8f70b4
      size = trailer->this_size;
Packit 8f70b4
      if (block == 0 || size == 0)
Packit 8f70b4
        abort ();
Packit 8f70b4
      trailer = (struct stk_trailer *) trailer->link;
Packit 8f70b4
      if ((block <= address) && (address < (block + size)))
Packit 8f70b4
        break;
Packit 8f70b4
    }
Packit 8f70b4
Packit 8f70b4
  /* Set the result to the offset in this segment and add the sizes
Packit 8f70b4
     of all predecessor segments.  */
Packit 8f70b4
Packit 8f70b4
  result = address - block;
Packit 8f70b4
Packit 8f70b4
  if (trailer == 0)
Packit 8f70b4
    {
Packit 8f70b4
      return result;
Packit 8f70b4
    }
Packit 8f70b4
Packit 8f70b4
  do
Packit 8f70b4
    {
Packit 8f70b4
      if (trailer->this_size <= 0)
Packit 8f70b4
        abort ();
Packit 8f70b4
      result += trailer->this_size;
Packit 8f70b4
      trailer = (struct stk_trailer *) trailer->link;
Packit 8f70b4
    }
Packit 8f70b4
  while (trailer != 0);
Packit 8f70b4
Packit 8f70b4
  /* We are done.  Note that if you present a bogus address (one
Packit 8f70b4
     not in any segment), you will get a different number back, formed
Packit 8f70b4
     from subtracting the address of the first block.  This is probably
Packit 8f70b4
     not what you want.  */
Packit 8f70b4
Packit 8f70b4
  return (result);
Packit 8f70b4
}
Packit 8f70b4
Packit 8f70b4
#   else /* not CRAY2 */
Packit 8f70b4
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Packit 8f70b4
   Determine the number of the cell within the stack,
Packit 8f70b4
   given the address of the cell.  The purpose of this
Packit 8f70b4
   routine is to linearize, in some sense, stack addresses
Packit 8f70b4
   for alloca.  */
Packit 8f70b4
Packit 8f70b4
static long
Packit 8f70b4
i00afunc (long address)
Packit 8f70b4
{
Packit 8f70b4
  long stkl = 0;
Packit 8f70b4
Packit 8f70b4
  long size, pseg, this_segment, stack;
Packit 8f70b4
  long result = 0;
Packit 8f70b4
Packit 8f70b4
  struct stack_segment_linkage *ssptr;
Packit 8f70b4
Packit 8f70b4
  /* Register B67 contains the address of the end of the
Packit 8f70b4
     current stack segment.  If you (as a subprogram) store
Packit 8f70b4
     your registers on the stack and find that you are past
Packit 8f70b4
     the contents of B67, you have overflowed the segment.
Packit 8f70b4
Packit 8f70b4
     B67 also points to the stack segment linkage control
Packit 8f70b4
     area, which is what we are really interested in.  */
Packit 8f70b4
Packit 8f70b4
  stkl = CRAY_STACKSEG_END ();
Packit 8f70b4
  ssptr = (struct stack_segment_linkage *) stkl;
Packit 8f70b4
Packit 8f70b4
  /* If one subtracts 'size' from the end of the segment,
Packit 8f70b4
     one has the address of the first word of the segment.
Packit 8f70b4
Packit 8f70b4
     If this is not the first segment, 'pseg' will be
Packit 8f70b4
     nonzero.  */
Packit 8f70b4
Packit 8f70b4
  pseg = ssptr->sspseg;
Packit 8f70b4
  size = ssptr->sssize;
Packit 8f70b4
Packit 8f70b4
  this_segment = stkl - size;
Packit 8f70b4
Packit 8f70b4
  /* It is possible that calling this routine itself caused
Packit 8f70b4
     a stack overflow.  Discard stack segments which do not
Packit 8f70b4
     contain the target address.  */
Packit 8f70b4
Packit 8f70b4
  while (!(this_segment <= address && address <= stkl))
Packit 8f70b4
    {
Packit 8f70b4
#    ifdef DEBUG_I00AFUNC
Packit 8f70b4
      fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
Packit 8f70b4
#    endif
Packit 8f70b4
      if (pseg == 0)
Packit 8f70b4
        break;
Packit 8f70b4
      stkl = stkl - pseg;
Packit 8f70b4
      ssptr = (struct stack_segment_linkage *) stkl;
Packit 8f70b4
      size = ssptr->sssize;
Packit 8f70b4
      pseg = ssptr->sspseg;
Packit 8f70b4
      this_segment = stkl - size;
Packit 8f70b4
    }
Packit 8f70b4
Packit 8f70b4
  result = address - this_segment;
Packit 8f70b4
Packit 8f70b4
  /* If you subtract pseg from the current end of the stack,
Packit 8f70b4
     you get the address of the previous stack segment's end.
Packit 8f70b4
     This seems a little convoluted to me, but I'll bet you save
Packit 8f70b4
     a cycle somewhere.  */
Packit 8f70b4
Packit 8f70b4
  while (pseg != 0)
Packit 8f70b4
    {
Packit 8f70b4
#    ifdef DEBUG_I00AFUNC
Packit 8f70b4
      fprintf (stderr, "%011o %011o\n", pseg, size);
Packit 8f70b4
#    endif
Packit 8f70b4
      stkl = stkl - pseg;
Packit 8f70b4
      ssptr = (struct stack_segment_linkage *) stkl;
Packit 8f70b4
      size = ssptr->sssize;
Packit 8f70b4
      pseg = ssptr->sspseg;
Packit 8f70b4
      result += size;
Packit 8f70b4
    }
Packit 8f70b4
  return (result);
Packit 8f70b4
}
Packit 8f70b4
Packit 8f70b4
#   endif /* not CRAY2 */
Packit 8f70b4
#  endif /* CRAY */
Packit 8f70b4
Packit 8f70b4
# endif /* no alloca */
Packit 8f70b4
#endif /* not GCC 2 */