Browse Source

Wasted too much space for minimum element count. Now minimum elements in vektor is 16, it grows and shrinks by a factor of 4 and a shrinking hysteresis of a factor of 5

dynamic-accesslists
erdgeist 18 years ago
parent
commit
401d0759ab
  1. 8
      trackerlogic.h

8
trackerlogic.h

@ -38,10 +38,10 @@ typedef time_t ot_time; @@ -38,10 +38,10 @@ typedef time_t ot_time;
#define OT_POOLS_TIMEOUT 300
#define NOW (time(NULL)/OT_POOLS_TIMEOUT)
#define OT_VECTOR_MIN_MEMBERS 128
#define OT_VECTOR_GROW_RATIO 2
#define OT_VECTOR_SHRINK_THRESH 3
#define OT_VECTOR_SHRINK_RATIO 2
#define OT_VECTOR_MIN_MEMBERS 16
#define OT_VECTOR_GROW_RATIO 4
#define OT_VECTOR_SHRINK_THRESH 5
#define OT_VECTOR_SHRINK_RATIO 4
typedef struct {
void *data;
size_t size;

Loading…
Cancel
Save