Changeset 50622a5


Ignore:
Timestamp:
Feb 28, 2007, 9:07:41 PM (17 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
db90f03
Parents:
e849734
git-author:
Nelson Elhage <nelhage@mit.edu> (02/28/07 14:25:57)
git-committer:
Nelson Elhage <nelhage@mit.edu> (02/28/07 21:07:41)
Message:
Allocate lists starting with 10 elements, not 30, and there's no
reason to grow lists unless they're *full*, half-full.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • list.c

    ref6e2d1 r50622a5  
    44static const char fileIdent[] = "$Id$";
    55
    6 #define INITSIZE 30
    7 #define GROWAT 2
     6#define INITSIZE 10
    87#define GROWBY 1.5
    98
     
    2726  void *ptr;
    2827
    29   if ((l->size+n) > (l->avail/GROWAT)) {
     28  if ((l->size+n) > l->avail) {
    3029    ptr=owl_realloc(l->list, l->avail*GROWBY*sizeof(void *));
    3130    if (ptr==NULL) abort();
Note: See TracChangeset for help on using the changeset viewer.