Lines Matching refs:header
203 struct chunk_header *header = ((struct chunk_header *)chunk) - 1; in free_chunk() local
205 int fd = header->fd; in free_chunk()
206 munmap(header->executable, size); in free_chunk()
207 munmap(header, size); in free_chunk()
224 struct block_header header; member
243 free_block->header.size = 0; in sljit_insert_free_block()
269 struct block_header *header; in sljit_malloc_exec() local
288 header = AS_BLOCK_HEADER(free_block, chunk_size); in sljit_malloc_exec()
289 header->prev_size = chunk_size; in sljit_malloc_exec()
290 header->executable_offset = free_block->header.executable_offset; in sljit_malloc_exec()
291 AS_BLOCK_HEADER(header, size)->prev_size = size; in sljit_malloc_exec()
295 header = (struct block_header*)free_block; in sljit_malloc_exec()
299 header->size = size; in sljit_malloc_exec()
301 return MEM_START(header); in sljit_malloc_exec()
320 header = (struct block_header *)(chunk_header + 1); in sljit_malloc_exec()
322 header->prev_size = 0; in sljit_malloc_exec()
323 header->executable_offset = executable_offset; in sljit_malloc_exec()
327 header->size = size; in sljit_malloc_exec()
330 free_block = AS_FREE_BLOCK(header, size); in sljit_malloc_exec()
331 free_block->header.prev_size = size; in sljit_malloc_exec()
332 free_block->header.executable_offset = executable_offset; in sljit_malloc_exec()
339 header->size = chunk_size; in sljit_malloc_exec()
340 next_header = AS_BLOCK_HEADER(header, chunk_size); in sljit_malloc_exec()
346 return MEM_START(header); in sljit_malloc_exec()
351 struct block_header *header; in sljit_free_exec() local
355 header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header)); in sljit_free_exec()
356 header = AS_BLOCK_HEADER(header, -header->executable_offset); in sljit_free_exec()
357 allocated_size -= header->size; in sljit_free_exec()
363 free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size); in sljit_free_exec()
364 if (SLJIT_UNLIKELY(!free_block->header.size)) { in sljit_free_exec()
365 free_block->size += header->size; in sljit_free_exec()
366 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
367 header->prev_size = free_block->size; in sljit_free_exec()
370 free_block = (struct free_block*)header; in sljit_free_exec()
371 sljit_insert_free_block(free_block, header->size); in sljit_free_exec()
374 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
375 if (SLJIT_UNLIKELY(!header->size)) { in sljit_free_exec()
376 free_block->size += ((struct free_block*)header)->size; in sljit_free_exec()
377 sljit_remove_free_block((struct free_block*)header); in sljit_free_exec()
378 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
379 header->prev_size = free_block->size; in sljit_free_exec()
383 if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) { in sljit_free_exec()
405 if (!free_block->header.prev_size && in sljit_free_unused_memory_exec()