Skip to content

Commit

Permalink
Merge pull request #230 from ngtcp2/less-memory
Browse files Browse the repository at this point in the history
Adjust memory pool allocation units to reduce allocation size
  • Loading branch information
tatsuhiro-t authored Jun 10, 2024
2 parents 57eef59 + 603bdfc commit c223968
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/nghttp3_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static int conn_new(nghttp3_conn **pconn, int server, int callbacks_version,

nghttp3_objalloc_init(&conn->out_chunk_objalloc,
NGHTTP3_STREAM_MIN_CHUNK_SIZE * 16, mem);
nghttp3_objalloc_stream_init(&conn->stream_objalloc, 64, mem);
nghttp3_objalloc_stream_init(&conn->stream_objalloc, 8, mem);

nghttp3_map_init(&conn->streams, mem);

Expand Down
3 changes: 1 addition & 2 deletions lib/nghttp3_ksl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ void nghttp3_ksl_init(nghttp3_ksl *ksl, nghttp3_ksl_compar compar,
size_t nodelen = ksl_nodelen(keylen);

nghttp3_objalloc_init(&ksl->blkalloc,
((ksl_blklen(nodelen) + 0xfu) & ~(uintptr_t)0xfu) * 8,
mem);
(ksl_blklen(nodelen) + 0xfu) & ~(uintptr_t)0xfu, mem);

ksl->head = NULL;
ksl->front = ksl->back = NULL;
Expand Down

0 comments on commit c223968

Please sign in to comment.