Home
last modified time | relevance | path

Searched refs:new_size (Results 1 – 25 of 26) sorted by relevance

12

/PHP-8.1/ext/standard/tests/file/
H A Duserstreams_005.phpt15 function stream_truncate($new_size) {
16 echo "truncation with new_size=$new_size\n";
21 function stream_truncate($new_size) {
22 echo "truncation with new_size=$new_size\n";
57 truncation with new_size=0
60 truncation with new_size=10
65 truncation with new_size=0
H A Dftruncate_variation3-win32.phpt50 $new_size = (int)(filesize($filename)/2);
53 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
58 var_dump( filesize($filename) ); // new file size = $new_size
H A Dftruncate_variation3.phpt50 $new_size = (int)(filesize($filename)/2);
53 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
58 var_dump( filesize($filename) ); // new file size = $new_size
H A Dftruncate_variation6-win32.phpt53 $new_size = 15;
56 if(ftruncate($file_handle, $new_size) ){// truncate it
57 echo "File content after truncating file to $new_size size : ";
H A Dftruncate_variation6.phpt53 $new_size = 15;
56 if(ftruncate($file_handle, $new_size) ){// truncate it
57 echo "File content after truncating file to $new_size size : ";
H A Dftruncate_variation1-win32-mb.phpt50 $new_size = 0;
53 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation1-win32.phpt50 $new_size = 0;
53 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation1.phpt50 $new_size = 0;
53 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation7-win32.phpt52 $new_size = 200;
55 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation7.phpt52 $new_size = 200;
55 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation2-win32.phpt51 $new_size = filesize($filename);
54 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation2.phpt51 $new_size = filesize($filename);
54 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation5-win32.phpt51 $new_size = filesize($filename) + 100;
54 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation5.phpt51 $new_size = filesize($filename) + 100;
54 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
H A Dftruncate_variation4.phpt45 $new_size = -1000;
50 var_dump( ftruncate($file_handle, $new_size) ); // truncate it
/PHP-8.1/ext/mysqlnd/
H A Dmysqlnd_alloc.c153 static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in _mysqlnd_erealloc()
159 TRACE_ALLOC_INF_FMT("ptr=%p old_size=%zu, new_size=%zu", ptr, old_size, new_size); in _mysqlnd_erealloc()
160 ret = erealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_erealloc()
164 *(size_t *) ret = new_size; in _mysqlnd_erealloc()
173 static void * _mysqlnd_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) in _mysqlnd_perealloc() argument
180 ret = perealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size), persistent); in _mysqlnd_perealloc()
187 *(size_t *) ret = new_size; in _mysqlnd_perealloc()
188 MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, new_size); in _mysqlnd_perealloc()
398 static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in mysqlnd_zend_mm_erealloc()
400 return erealloc_rel(ptr, new_size); in mysqlnd_zend_mm_erealloc()
[all …]
H A Dmysqlnd_alloc.h32 void * (*m_erealloc)(void *ptr, size_t new_size MYSQLND_MEM_D);
33 void * (*m_perealloc)(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D);
47 #define mnd_erealloc(ptr, new_size) mysqlnd_allocator.m_erealloc((ptr), (new_size) MYSQLND_MEM_C) argument
48 #define mnd_perealloc(ptr, new_size, p) mysqlnd_allocator.m_perealloc((ptr), (new_size), (p) MYSQLN… argument
/PHP-8.1/Zend/
H A Dzend_alloc.c787 zend_mm_munmap((char*)addr + new_size, old_size - new_size);
1467 size_t new_size; local
1490 if (new_size == old_size) {
1497 } else if (new_size < old_size) {
1555 size_t new_size; local
1634 if (new_size == old_size) {
1802 if (UNEXPECTED(new_size < size)) {
1856 heap->real_size += new_size;
2826 if (new_size > old_size) {
2836 tracked_add(heap, ptr, new_size);
[all …]
H A Dzend_objects_API.c134 uint32_t new_size = 2 * EG(objects_store).size; in zend_objects_store_put_cold() local
136 …t_buckets = (zend_object **) erealloc(EG(objects_store).object_buckets, new_size * sizeof(zend_obj… in zend_objects_store_put_cold()
138 EG(objects_store).size = new_size; in zend_objects_store_put_cold()
H A Dzend_gc.c530 size_t new_size; in gc_grow_root_buffer() local
542 new_size = GC_G(buf_size) * 2; in gc_grow_root_buffer()
544 new_size = GC_G(buf_size) + GC_BUF_GROW_STEP; in gc_grow_root_buffer()
546 if (new_size > GC_MAX_BUF_SIZE) { in gc_grow_root_buffer()
547 new_size = GC_MAX_BUF_SIZE; in gc_grow_root_buffer()
549 GC_G(buf) = perealloc(GC_G(buf), sizeof(gc_root_buffer) * new_size, 1); in gc_grow_root_buffer()
550 GC_G(buf_size) = new_size; in gc_grow_root_buffer()
H A Dzend_alloc.h299 …zend_mm_chunk_truncate_t)(zend_mm_storage *storage, void *chunk, size_t old_size, size_t new_size);
300 …(*zend_mm_chunk_extend_t)(zend_mm_storage *storage, void *chunk, size_t old_size, size_t new_size);
/PHP-8.1/main/streams/
H A Dplain_wrapper.c939 ptrdiff_t new_size = *(ptrdiff_t*)ptrparam; in php_stdiop_set_option() local
940 if (new_size < 0) { in php_stdiop_set_option()
957 sz.QuadPart = new_size; in php_stdiop_set_option()
960 sz.LowPart = new_size; in php_stdiop_set_option()
973 … return ftruncate(fd, new_size) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; in php_stdiop_set_option()
H A Duserspace.c978 ptrdiff_t new_size = *(ptrdiff_t*) ptrparam; in php_userstreamop_set_option() local
979 if (new_size >= 0 && new_size <= (ptrdiff_t)LONG_MAX) { in php_userstreamop_set_option()
980 ZVAL_LONG(&args[0], (zend_long)new_size); in php_userstreamop_set_option()
/PHP-8.1/ext/standard/
H A Dhtml.c985 size_t new_size; in php_unescape_html_entities() local
999 new_size = TRAVERSE_FOR_ENTITIES_EXPAND_SIZE(ZSTR_LEN(str)); in php_unescape_html_entities()
1000 if (ZSTR_LEN(str) > new_size) { in php_unescape_html_entities()
1005 ret = zend_string_alloc(new_size, 0); in php_unescape_html_entities()
/PHP-8.1/ext/exif/
H A Dexif.c2881 size_t new_size, new_move, new_value; in exif_thumbnail_build() local
2902 new_size = 8 + 2 + info_list->count * 12 + 4; in exif_thumbnail_build()
2904 …nfo, E_NOTICE, "Thumbnail: size of signature + directory(%d): 0x%02X", info_list->count, new_size); in exif_thumbnail_build()
2906 new_value= new_size; /* offset for ifd values outside ifd directory */ in exif_thumbnail_build()
2911 new_size += byte_count; in exif_thumbnail_build()
2914 new_move = new_size; in exif_thumbnail_build()
2915 new_data = safe_erealloc(ImageInfo->Thumbnail.data, 1, ImageInfo->Thumbnail.size, new_size); in exif_thumbnail_build()
2918 ImageInfo->Thumbnail.size += new_size; in exif_thumbnail_build()

Completed in 86 milliseconds

12