nghttp2_map: Use initial size 256 so that we don't resize it until 100 streams

This commit is contained in:
Tatsuhiro Tsujikawa 2014-09-29 22:46:13 +09:00
parent b6d0a32d0e
commit df56b69060
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@
#include <string.h> #include <string.h>
#define INITIAL_TABLE_LENGTH 16 #define INITIAL_TABLE_LENGTH 256
int nghttp2_map_init(nghttp2_map *map) int nghttp2_map_init(nghttp2_map *map)
{ {
@ -138,6 +138,7 @@ static int resize(nghttp2_map *map, size_t new_tablelen)
free(map->table); free(map->table);
map->tablelen = new_tablelen; map->tablelen = new_tablelen;
map->table = new_table; map->table = new_table;
return 0; return 0;
} }