Lines Matching refs:header
254 struct chunk_header *header = ((struct chunk_header *)chunk) - 1; in free_chunk() local
256 munmap(header->executable, size); in free_chunk()
257 munmap((void *)header, size); in free_chunk()
273 struct block_header header; member
292 free_block->header.size = 0; in sljit_insert_free_block()
318 struct block_header *header; in sljit_malloc_exec() local
337 header = AS_BLOCK_HEADER(free_block, chunk_size); in sljit_malloc_exec()
338 header->prev_size = chunk_size; in sljit_malloc_exec()
339 header->executable_offset = free_block->header.executable_offset; in sljit_malloc_exec()
340 AS_BLOCK_HEADER(header, size)->prev_size = size; in sljit_malloc_exec()
344 header = (struct block_header*)free_block; in sljit_malloc_exec()
348 header->size = size; in sljit_malloc_exec()
350 return MEM_START(header); in sljit_malloc_exec()
369 header = (struct block_header *)(chunk_header + 1); in sljit_malloc_exec()
371 header->prev_size = 0; in sljit_malloc_exec()
372 header->executable_offset = executable_offset; in sljit_malloc_exec()
376 header->size = size; in sljit_malloc_exec()
379 free_block = AS_FREE_BLOCK(header, size); in sljit_malloc_exec()
380 free_block->header.prev_size = size; in sljit_malloc_exec()
381 free_block->header.executable_offset = executable_offset; in sljit_malloc_exec()
388 header->size = chunk_size; in sljit_malloc_exec()
389 next_header = AS_BLOCK_HEADER(header, chunk_size); in sljit_malloc_exec()
395 return MEM_START(header); in sljit_malloc_exec()
400 struct block_header *header; in sljit_free_exec() local
404 header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header)); in sljit_free_exec()
405 header = AS_BLOCK_HEADER(header, -header->executable_offset); in sljit_free_exec()
406 allocated_size -= header->size; in sljit_free_exec()
412 free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size); in sljit_free_exec()
413 if (SLJIT_UNLIKELY(!free_block->header.size)) { in sljit_free_exec()
414 free_block->size += header->size; in sljit_free_exec()
415 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
416 header->prev_size = free_block->size; in sljit_free_exec()
419 free_block = (struct free_block*)header; in sljit_free_exec()
420 sljit_insert_free_block(free_block, header->size); in sljit_free_exec()
423 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
424 if (SLJIT_UNLIKELY(!header->size)) { in sljit_free_exec()
425 free_block->size += ((struct free_block*)header)->size; in sljit_free_exec()
426 sljit_remove_free_block((struct free_block*)header); in sljit_free_exec()
427 header = AS_BLOCK_HEADER(free_block, free_block->size); in sljit_free_exec()
428 header->prev_size = free_block->size; in sljit_free_exec()
432 if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) { in sljit_free_exec()
456 if (!free_block->header.prev_size && in sljit_free_unused_memory_exec()