mirror of
https://erdgeist.org/gitweb/opentracker
synced 2024-05-10 07:54:50 +00: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user