Lines Matching refs:header
133 struct block_header header; member
152 free_block->header.size = 0; in sljit_insert_free_block()
177 struct block_header *header; in sljit_malloc_exec() local
195 header = AS_BLOCK_HEADER(free_block, chunk_size); in sljit_malloc_exec()
196 header->prev_size = chunk_size; in sljit_malloc_exec()
197 AS_BLOCK_HEADER(header, size)->prev_size = size; in sljit_malloc_exec()
201 header = (struct block_header*)free_block; in sljit_malloc_exec()
205 header->size = size; in sljit_malloc_exec()
207 return MEM_START(header); in sljit_malloc_exec()
213 header = (struct block_header*)alloc_chunk(chunk_size); in sljit_malloc_exec()
214 if (!header) { in sljit_malloc_exec()
222 header->prev_size = 0; in sljit_malloc_exec()
226 header->size = size; in sljit_malloc_exec()
229 free_block = AS_FREE_BLOCK(header, size); in sljit_malloc_exec()
230 free_block->header.prev_size = size; in sljit_malloc_exec()
237 header->size = chunk_size; in sljit_malloc_exec()
238 next_header = AS_BLOCK_HEADER(header, chunk_size); in sljit_malloc_exec()
243 return MEM_START(header); in sljit_malloc_exec()
248 struct block_header *header; in sljit_free_exec() local
252 header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header)); in sljit_free_exec()
253 allocated_size -= header->size; in sljit_free_exec()
259 free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size); in sljit_free_exec()
260 if (SLJIT_UNLIKELY(!free_block->header.size)) { in sljit_free_exec()
261 free_block->size += header->size; in sljit_free_exec()
262 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
263 header->prev_size = free_block->size; in sljit_free_exec()
266 free_block = (struct free_block*)header; in sljit_free_exec()
267 sljit_insert_free_block(free_block, header->size); in sljit_free_exec()
270 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
271 if (SLJIT_UNLIKELY(!header->size)) { in sljit_free_exec()
272 free_block->size += ((struct free_block*)header)->size; in sljit_free_exec()
273 sljit_remove_free_block((struct free_block*)header); in sljit_free_exec()
274 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
275 header->prev_size = free_block->size; in sljit_free_exec()
279 if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) { in sljit_free_exec()
301 if (!free_block->header.prev_size && in sljit_free_unused_memory_exec()