Lines Matching defs:mem

594                            nghttp2_mem *mem) {
598 ringbuf->buffer = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry *) * size);
615 nghttp2_mem *mem) {
625 buffer = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry *) * size);
632 nghttp2_mem_free(mem, ringbuf->buffer);
639 static void hd_ringbuf_free(nghttp2_hd_ringbuf *ringbuf, nghttp2_mem *mem) {
648 nghttp2_mem_free(mem, ent);
650 nghttp2_mem_free(mem, ringbuf->buffer);
654 nghttp2_hd_entry *ent, nghttp2_mem *mem) {
657 rv = hd_ringbuf_reserve(ringbuf, ringbuf->len + 1, mem);
674 static int hd_context_init(nghttp2_hd_context *context, nghttp2_mem *mem) {
676 context->mem = mem;
681 context->hd_table_bufsize_max / NGHTTP2_HD_ENTRY_OVERHEAD, mem);
693 hd_ringbuf_free(&context->hd_table, context->mem);
696 int nghttp2_hd_deflate_init(nghttp2_hd_deflater *deflater, nghttp2_mem *mem) {
698 deflater, NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE, mem);
703 nghttp2_mem *mem) {
705 rv = hd_context_init(&deflater->ctx, mem);
725 int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater, nghttp2_mem *mem) {
728 rv = hd_context_init(&inflater->ctx, mem);
1106 nghttp2_mem *mem;
1108 mem = context->mem;
1129 nghttp2_mem_free(mem, ent);
1138 new_ent = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry));
1145 rv = hd_ringbuf_push_front(&context->hd_table, new_ent, mem);
1149 nghttp2_mem_free(mem, new_ent);
1225 nghttp2_mem *mem;
1227 mem = context->mem;
1241 nghttp2_mem_free(mem, ent);
1349 nghttp2_mem *mem;
1355 mem = deflater->ctx.mem;
1403 rv = nghttp2_rcbuf_new2(&hd_nv.name, nv->name, nv->namelen, mem);
1409 rv = nghttp2_rcbuf_new2(&hd_nv.value, nv->value, nv->valuelen, mem);
1496 nghttp2_mem *mem;
1498 mem = deflater->ctx.mem;
1500 rv = nghttp2_bufs_wrap_init(&bufs, buf, buflen, mem);
1528 nghttp2_mem *mem;
1531 mem = deflater->ctx.mem;
1533 rv = nghttp2_bufs_wrap_init2(&bufs, vec, veclen, mem);
1591 nghttp2_mem *mem) {
1595 if (mem == NULL) {
1596 mem = nghttp2_mem_default();
1599 deflater = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_deflater));
1605 rv = nghttp2_hd_deflate_init2(deflater, deflate_hd_table_bufsize_max, mem);
1608 nghttp2_mem_free(mem, deflater);
1619 nghttp2_mem *mem;
1621 mem = deflater->ctx.mem;
1625 nghttp2_mem_free(mem, deflater);
1878 nghttp2_mem *mem;
1880 mem = inflater->ctx.mem;
2031 mem);
2034 rv = nghttp2_rcbuf_new(&inflater->namercbuf, inflater->left + 1, mem);
2116 mem);
2120 rv = nghttp2_rcbuf_new(&inflater->valuercbuf, inflater->left + 1, mem);
2249 nghttp2_mem *mem) {
2253 if (mem == NULL) {
2254 mem = nghttp2_mem_default();
2257 inflater = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_inflater));
2263 rv = nghttp2_hd_inflate_init(inflater, mem);
2266 nghttp2_mem_free(mem, inflater);
2277 nghttp2_mem *mem;
2279 mem = inflater->ctx.mem;
2282 nghttp2_mem_free(mem, inflater);