After studying opentracker live data, I decided to radically reduce default allocation for vectors and making it grow faster instead: Most pools only had one or two peers, wasting 8*15 or 8*14 bytes.

master
Dirk Engling 2007-10-19 14:41:30 +00:00
parent b7e8a852e8
commit 71436d6b24
1 changed files with 3 additions and 3 deletions

View File

@ -45,9 +45,9 @@ typedef time_t ot_time;
extern time_t g_now;
#define NOW (g_now/OT_POOLS_TIMEOUT)
#define OT_VECTOR_MIN_MEMBERS 16
#define OT_VECTOR_GROW_RATIO 4
#define OT_VECTOR_SHRINK_THRESH 5
#define OT_VECTOR_MIN_MEMBERS 4
#define OT_VECTOR_GROW_RATIO 8
#define OT_VECTOR_SHRINK_THRESH 6
#define OT_VECTOR_SHRINK_RATIO 4
typedef struct {
void *data;