Skip to content

Commit

Permalink
nghttp3_balloc: Port ngtcp2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Aug 13, 2024
1 parent a8f39cb commit 75e005d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/nghttp3_balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ int nghttp3_balloc_get(nghttp3_balloc *balloc, void **pbuf, size_t n) {
assert(n <= balloc->blklen);

if (nghttp3_buf_left(&balloc->buf) < n) {
p = nghttp3_mem_malloc(balloc->mem, sizeof(nghttp3_memblock_hd) + 0x10u +
balloc->blklen);
p = nghttp3_mem_malloc(balloc->mem,
sizeof(nghttp3_memblock_hd) + 0x8u + balloc->blklen);
if (p == NULL) {
return NGHTTP3_ERR_NOMEM;
}
Expand Down
5 changes: 4 additions & 1 deletion lib/nghttp3_balloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ typedef struct nghttp3_memblock_hd nghttp3_memblock_hd;
* nghttp3_memblock_hd is the header of memory block.
*/
struct nghttp3_memblock_hd {
nghttp3_memblock_hd *next;
union {
nghttp3_memblock_hd *next;
uint64_t pad;
};
};

/*
Expand Down

0 comments on commit 75e005d

Please sign in to comment.