[515] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r635 - in trunk: . owl

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:06:59 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Wed, 28 Feb 2007 21:07:42 -0500 (EST)

Author: nelhage
Date: 2007-02-28 21:07:41 -0500 (Wed, 28 Feb 2007)
New Revision: 635

Modified:
   trunk/
   trunk/owl/list.c
Log:
 r19152@phanatique:  nelhage | 2007-02-28 14:25:57 -0500
 Allocate lists starting with 10 elements, not 30, and there's no
 reason to grow lists unless they're *full*, half-full.
 



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:19149
   + bb873fd7-8e23-0410-944a-99ec44c633eb:/branches/owl/filter-rewrite:15925
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h/trunk:19152

Modified: trunk/owl/list.c
===================================================================
--- trunk/owl/list.c	2007-03-01 02:07:37 UTC (rev 634)
+++ trunk/owl/list.c	2007-03-01 02:07:41 UTC (rev 635)
@@ -3,8 +3,7 @@
 
 static const char fileIdent[] = "$Id$";
 
-#define INITSIZE 30
-#define GROWAT 2
+#define INITSIZE 10
 #define GROWBY 1.5
 
 int owl_list_create(owl_list *l)
@@ -26,7 +25,7 @@
 {
   void *ptr;
 
-  if ((l->size+n) > (l->avail/GROWAT)) {
+  if ((l->size+n) > l->avail) {
     ptr=owl_realloc(l->list, l->avail*GROWBY*sizeof(void *));
     if (ptr==NULL) abort();
     l->list=ptr;


home help back first fref pref prev next nref lref last post