mirror of
git://erdgeist.org/opentracker
synced 2025-02-22 09:01:29 +08:00
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
This commit is contained in:
parent
9882d74b7e
commit
401d0759ab
@ -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…
x
Reference in New Issue
Block a user