Lines Matching refs:chunk
256 mp_parse_chunk_t *chunk = parser->cur_chunk; in parser_alloc() local
258 if (chunk != NULL && chunk->union_.used + num_bytes > chunk->alloc) { in parser_alloc()
260 mp_parse_chunk_t *new_data = (mp_parse_chunk_t *)m_renew_maybe(byte, chunk, in parser_alloc()
261 sizeof(mp_parse_chunk_t) + chunk->alloc, in parser_alloc()
262 sizeof(mp_parse_chunk_t) + chunk->alloc + num_bytes, false); in parser_alloc()
265 (void)m_renew_maybe(byte, chunk, sizeof(mp_parse_chunk_t) + chunk->alloc, in parser_alloc()
266 sizeof(mp_parse_chunk_t) + chunk->union_.used, false); in parser_alloc()
267 chunk->alloc = chunk->union_.used; in parser_alloc()
268 chunk->union_.next = parser->tree.chunk; in parser_alloc()
269 parser->tree.chunk = chunk; in parser_alloc()
270 chunk = NULL; in parser_alloc()
273 chunk->alloc += num_bytes; in parser_alloc()
277 if (chunk == NULL) { in parser_alloc()
283 chunk = (mp_parse_chunk_t *)m_new(byte, sizeof(mp_parse_chunk_t) + alloc); in parser_alloc()
284 chunk->alloc = alloc; in parser_alloc()
285 chunk->union_.used = 0; in parser_alloc()
286 parser->cur_chunk = chunk; in parser_alloc()
289 byte *ret = chunk->data + chunk->union_.used; in parser_alloc()
290 chunk->union_.used += num_bytes; in parser_alloc()
849 parser.tree.chunk = NULL; in mp_parse()
1139 parser.cur_chunk->union_.next = parser.tree.chunk; in mp_parse()
1140 parser.tree.chunk = parser.cur_chunk; in mp_parse()
1188 mp_parse_chunk_t *chunk = tree->chunk; in mp_parse_tree_clear() local
1189 while (chunk != NULL) { in mp_parse_tree_clear()
1190 mp_parse_chunk_t *next = chunk->union_.next; in mp_parse_tree_clear()
1191 m_del(byte, chunk, sizeof(mp_parse_chunk_t) + chunk->alloc); in mp_parse_tree_clear()
1192 chunk = next; in mp_parse_tree_clear()