Lines Matching refs:header
193 struct block_header header; member
212 free_block->header.size = 0; in sljit_insert_free_block()
237 struct block_header *header; in sljit_malloc_exec() local
255 header = AS_BLOCK_HEADER(free_block, chunk_size); in sljit_malloc_exec()
256 header->prev_size = chunk_size; in sljit_malloc_exec()
257 AS_BLOCK_HEADER(header, size)->prev_size = size; in sljit_malloc_exec()
261 header = (struct block_header*)free_block; in sljit_malloc_exec()
265 header->size = size; in sljit_malloc_exec()
267 return MEM_START(header); in sljit_malloc_exec()
273 header = (struct block_header*)alloc_chunk(chunk_size); in sljit_malloc_exec()
274 if (!header) { in sljit_malloc_exec()
282 header->prev_size = 0; in sljit_malloc_exec()
286 header->size = size; in sljit_malloc_exec()
289 free_block = AS_FREE_BLOCK(header, size); in sljit_malloc_exec()
290 free_block->header.prev_size = size; in sljit_malloc_exec()
297 header->size = chunk_size; in sljit_malloc_exec()
298 next_header = AS_BLOCK_HEADER(header, chunk_size); in sljit_malloc_exec()
303 return MEM_START(header); in sljit_malloc_exec()
308 struct block_header *header; in sljit_free_exec() local
312 header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header)); in sljit_free_exec()
313 allocated_size -= header->size; in sljit_free_exec()
319 free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size); in sljit_free_exec()
320 if (SLJIT_UNLIKELY(!free_block->header.size)) { in sljit_free_exec()
321 free_block->size += header->size; in sljit_free_exec()
322 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
323 header->prev_size = free_block->size; in sljit_free_exec()
326 free_block = (struct free_block*)header; in sljit_free_exec()
327 sljit_insert_free_block(free_block, header->size); in sljit_free_exec()
330 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
331 if (SLJIT_UNLIKELY(!header->size)) { in sljit_free_exec()
332 free_block->size += ((struct free_block*)header)->size; in sljit_free_exec()
333 sljit_remove_free_block((struct free_block*)header); in sljit_free_exec()
334 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
335 header->prev_size = free_block->size; in sljit_free_exec()
339 if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) { in sljit_free_exec()
361 if (!free_block->header.prev_size && in sljit_free_unused_memory_exec()