Lines Matching refs:mem

99 	(((char*)(ptr) >= (char*)script->mem && (char*)(ptr) < (char*)script->mem + script->size) || \
104 (ptr) = (void*)((char*)(ptr) - (char*)script->mem); \
124 (ptr) = (void*)((char*)(ptr) - (char*)script->mem); \
210 if (info->str_size + len > ZSTR_LEN((zend_string*)ZCG(mem))) { in zend_file_cache_serialize_interned()
212 ZCG(mem) = (void*)zend_string_realloc( in zend_file_cache_serialize_interned()
213 (zend_string*)ZCG(mem), in zend_file_cache_serialize_interned()
217 memcpy(ZSTR_VAL((zend_string*)ZCG(mem)) + info->str_size, str, len); in zend_file_cache_serialize_interned()
226 str = (zend_string*)((char*)ZCG(mem) + ((size_t)(str) & ~Z_UL(1))); in zend_file_cache_unserialize_interned()
685 info->script_offset = (char*)script - (char*)script->mem; in zend_file_cache_serialize()
688 memcpy(buf, script->mem, script->size); in zend_file_cache_serialize()
698 new_script->mem = NULL; in zend_file_cache_serialize()
741 void *mem, *buf; in zend_file_cache_script_store() local
772 mem = emalloc(script->size + 64); in zend_file_cache_script_store()
773 buf = (void*)(((zend_uintptr_t)mem + 63L) & ~63L); in zend_file_cache_script_store()
775 mem = buf = emalloc(script->size); in zend_file_cache_script_store()
778 ZCG(mem) = zend_string_alloc(4096 - (_ZSTR_HEADER_SIZE + 1), 0); in zend_file_cache_script_store()
791 …info.checksum = zend_adler32(info.checksum, (signed char*)ZSTR_VAL((zend_string*)ZCG(mem)), info.s… in zend_file_cache_script_store()
798 vec[2].iov_base = ZSTR_VAL((zend_string*)ZCG(mem)); in zend_file_cache_script_store()
803 zend_string_release((zend_string*)ZCG(mem)); in zend_file_cache_script_store()
805 efree(mem); in zend_file_cache_script_store()
814 write(fd, ((zend_string*)ZCG(mem))->val, info.str_size) != info.str_size in zend_file_cache_script_store()
817 zend_string_release((zend_string*)ZCG(mem)); in zend_file_cache_script_store()
819 efree(mem); in zend_file_cache_script_store()
826 zend_string_release((zend_string*)ZCG(mem)); in zend_file_cache_script_store()
827 efree(mem); in zend_file_cache_script_store()
1240 script->mem = buf; in zend_file_cache_unserialize()
1261 void *mem, *checkpoint, *buf; in zend_file_cache_script_load() local
1324 mem = zend_arena_alloc(&CG(arena), info.mem_size + info.str_size + 64); in zend_file_cache_script_load()
1325 mem = (void*)(((zend_uintptr_t)mem + 63L) & ~63L); in zend_file_cache_script_load()
1327 mem = zend_arena_alloc(&CG(arena), info.mem_size + info.str_size); in zend_file_cache_script_load()
1330 if (read(fd, mem, info.mem_size + info.str_size) != (ssize_t)(info.mem_size + info.str_size)) { in zend_file_cache_script_load()
1346 zend_adler32(ADLER32_INIT, mem, info.mem_size + info.str_size) != info.checksum) { in zend_file_cache_script_load()
1396 memcpy(buf, mem, info.mem_size); in zend_file_cache_script_load()
1399 buf = mem; in zend_file_cache_script_load()
1403 ZCG(mem) = ((char*)mem + info.mem_size); in zend_file_cache_script_load()