Lines Matching refs:size
170 size_t size; in zend_stream_fixup() local
209 size = zend_stream_fsize(file_handle); in zend_stream_fixup()
210 if (size == (size_t)-1) { in zend_stream_fixup()
217 if (old_type == ZEND_HANDLE_FP && !file_handle->handle.stream.isatty && size) { in zend_stream_fixup()
222 size != 0 && in zend_stream_fixup()
223 ((size - 1) % page_size) <= page_size - ZEND_MMAP_AHEAD) { in zend_stream_fixup()
225 … *buf = mmap(0, size + ZEND_MMAP_AHEAD, PROT_READ, MAP_PRIVATE, fileno(file_handle->handle.fp), 0); in zend_stream_fixup()
232 size -= offset; in zend_stream_fixup()
235 file_handle->handle.stream.mmap.len = size; in zend_stream_fixup()
242 file_handle->handle.stream.mmap.buf = *buf = safe_emalloc(1, size, ZEND_MMAP_AHEAD); in zend_stream_fixup()
243 file_handle->handle.stream.mmap.len = zend_stream_read(file_handle, *buf, size); in zend_stream_fixup()
247 size = 0; in zend_stream_fixup()
249 while ((read = zend_stream_read(file_handle, *buf + size, remain)) > 0) { in zend_stream_fixup()
250 size += read; in zend_stream_fixup()
254 *buf = safe_erealloc(*buf, size, 2, 0); in zend_stream_fixup()
255 remain = size; in zend_stream_fixup()
259 file_handle->handle.stream.mmap.len = size; in zend_stream_fixup()
260 if (size && remain < ZEND_MMAP_AHEAD) { in zend_stream_fixup()
261 *buf = safe_erealloc(*buf, size, 1, ZEND_MMAP_AHEAD); in zend_stream_fixup()