79 #ifdef SLJIT_HAS_CHUNK_HEADER
80 #define CHUNK_HEADER_SIZE (sizeof(struct sljit_chunk_header))
82 #define CHUNK_HEADER_SIZE 0
85 #ifndef SLJIT_UPDATE_WX_FLAGS
86 #define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec)
91 #define CHUNK_SIZE (sljit_uw)0x10000
97 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
109 #define AS_BLOCK_HEADER(base, offset) \
110 ((struct block_header*)(((sljit_u8*)base) + offset))
111 #define AS_FREE_BLOCK(base, offset) \
112 ((struct free_block*)(((sljit_u8*)base) + offset))
113 #define MEM_START(base) ((void*)((base) + 1))
114 #define CHUNK_MASK (~(CHUNK_SIZE - 1))
115 #define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7u) & ~(sljit_uw)7)
116 #define CHUNK_EXTRA_SIZE (sizeof(struct block_header) + CHUNK_HEADER_SIZE)
154 #ifdef SLJIT_HAS_CHUNK_HEADER
160 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
168 SLJIT_ALLOCATOR_LOCK();
180 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
191 SLJIT_ALLOCATOR_UNLOCK();
201 SLJIT_ALLOCATOR_UNLOCK();
205 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
215 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
216 header->executable_offset = executable_offset;
227 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
238 next_header->
size = 1;
240 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
241 next_header->executable_offset = executable_offset;
243 SLJIT_ALLOCATOR_UNLOCK();
252 SLJIT_ALLOCATOR_LOCK();
254 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
294 SLJIT_ALLOCATOR_UNLOCK();
302 SLJIT_ALLOCATOR_LOCK();
319 SLJIT_ALLOCATOR_UNLOCK();
322 #ifdef SLJIT_HAS_EXECUTABLE_OFFSET
static const int chunk_size
const struct ncbi::grid::netcache::search::fields::SIZE size
#define SLJIT_UNLIKELY(x)
#define SLJIT_API_FUNC_ATTRIBUTE
static SLJIT_INLINE void * alloc_chunk(sljit_uw size)
static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size)
static SLJIT_INLINE void sljit_remove_free_block(struct free_block *free_block)
#define CHUNK_HEADER_SIZE
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void *ptr)
static SLJIT_INLINE void sljit_insert_free_block(struct free_block *free_block, sljit_uw size)
#define AS_BLOCK_HEADER(base, offset)
#define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec)
#define AS_FREE_BLOCK(base, offset)
static sljit_uw allocated_size
SLJIT_API_FUNC_ATTRIBUTE void * sljit_malloc_exec(sljit_uw size)
static struct free_block * free_blocks
static sljit_uw total_size
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void)
#define SLJIT_CODE_TO_PTR(code)
struct block_header header