Home
last modified time | relevance | path

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

12

/php-src/ext/dom/lexbor/lexbor/core/
H A Dmraw.c248 if (chunk->size > (begin_len + new_size)) { in lexbor_mraw_realloc_tail()
251 if (new_size == 0) { in lexbor_mraw_realloc_tail()
260 chunk->length = begin_len + new_size; in lexbor_mraw_realloc_tail()
261 memcpy(begin, &new_size, sizeof(size_t)); in lexbor_mraw_realloc_tail()
324 new_size = lexbor_mem_align(new_size); in lexbor_mraw_realloc()
344 if (new_size < size) { in lexbor_mraw_realloc()
345 if (new_size == 0) { in lexbor_mraw_realloc()
360 memcpy(begin, &new_size, sizeof(size_t)); in lexbor_mraw_realloc()
362 new_size = diff - lexbor_mraw_meta_size(); in lexbor_mraw_realloc()
365 lexbor_mraw_meta_set(begin, &new_size); in lexbor_mraw_realloc()
[all …]
H A Darray.c69 size_t new_size; in lexbor_array_expand() local
74 new_size = array->length + up_to; in lexbor_array_expand()
75 list = lexbor_realloc(array->list, sizeof(void *) * new_size); in lexbor_array_expand()
81 array->size = new_size; in lexbor_array_expand()
H A Darray_obj.c72 size_t new_size; in lexbor_array_obj_expand() local
78 new_size = array->length + up_to; in lexbor_array_obj_expand()
81 * (new_size * array->struct_size)); in lexbor_array_obj_expand()
87 array->size = new_size; in lexbor_array_obj_expand()
H A Dmraw.h56 lexbor_mraw_realloc(lexbor_mraw_t *mraw, void *data, size_t new_size);
H A Dstr.c94 lexbor_str_realloc(lexbor_str_t *str, lexbor_mraw_t *mraw, size_t new_size) in lexbor_str_realloc() argument
96 lxb_char_t *tmp = lexbor_mraw_realloc(mraw, str->data, new_size); in lexbor_str_realloc()
H A Dstr.h74 lexbor_str_realloc(lexbor_str_t *str, lexbor_mraw_t *mraw, size_t new_size);
/php-src/ext/standard/tests/file/
H A Duserstreams_005.phpt16 function stream_truncate($new_size) {
17 echo "truncation with new_size=$new_size\n";
22 function stream_truncate($new_size) {
23 echo "truncation with new_size=$new_size\n";
58 truncation with new_size=0
61 truncation with new_size=10
66 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
/php-src/ext/odbc/
H A Dodbc_utils.c62 size_t new_size = php_odbc_connstr_estimate_quote_length(ZSTR_VAL(str)); in PHP_FUNCTION() local
63 zend_string *new_string = zend_string_alloc(new_size, 0); in PHP_FUNCTION()
64 php_odbc_connstr_quote(ZSTR_VAL(new_string), ZSTR_VAL(str), new_size); in PHP_FUNCTION()
/php-src/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-src/Zend/
H A Dzend_alloc.c808 zend_mm_munmap((char*)addr + new_size, old_size - new_size);
1488 size_t new_size; local
1511 if (new_size == old_size) {
1518 } else if (new_size < old_size) {
1576 size_t new_size; local
1655 if (new_size == old_size) {
1823 if (UNEXPECTED(new_size < size)) {
1877 heap->real_size += new_size;
2842 if (new_size > old_size) {
2852 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.c581 size_t new_size; in gc_grow_root_buffer() local
593 new_size = GC_G(buf_size) * 2; in gc_grow_root_buffer()
595 new_size = GC_G(buf_size) + GC_BUF_GROW_STEP; in gc_grow_root_buffer()
597 if (new_size > GC_MAX_BUF_SIZE) { in gc_grow_root_buffer()
598 new_size = GC_MAX_BUF_SIZE; in gc_grow_root_buffer()
600 GC_G(buf) = perealloc(GC_G(buf), sizeof(gc_root_buffer) * new_size, 1); in gc_grow_root_buffer()
601 GC_G(buf_size) = new_size; in gc_grow_root_buffer()
H A Dzend_alloc.h288 …zend_mm_chunk_truncate_t)(zend_mm_storage *storage, void *chunk, size_t old_size, size_t new_size);
289 …(*zend_mm_chunk_extend_t)(zend_mm_storage *storage, void *chunk, size_t old_size, size_t new_size);
/php-src/ext/dom/lexbor/lexbor/html/
H A Dtokenizer.h257 size_t new_size = (tkz->end - tkz->start) + size + 4096; in lxb_html_tokenizer_temp_realloc() local
259 tkz->start = (lxb_char_t *)lexbor_realloc(tkz->start, new_size); in lxb_html_tokenizer_temp_realloc()
266 tkz->end = tkz->start + new_size; in lxb_html_tokenizer_temp_realloc()
/php-src/main/streams/
H A Dplain_wrapper.c943 ptrdiff_t new_size = *(ptrdiff_t*)ptrparam; in php_stdiop_set_option() local
944 if (new_size < 0) { in php_stdiop_set_option()
961 sz.QuadPart = new_size; in php_stdiop_set_option()
964 sz.LowPart = new_size; in php_stdiop_set_option()
977 … return ftruncate(fd, new_size) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; in php_stdiop_set_option()
H A Duserspace.c944 ptrdiff_t new_size = *(ptrdiff_t*) ptrparam; in php_userstreamop_set_option() local
945 if (new_size >= 0 && new_size <= (ptrdiff_t)LONG_MAX) { in php_userstreamop_set_option()
946 ZVAL_LONG(&args[0], (zend_long)new_size); in php_userstreamop_set_option()
/php-src/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()

Completed in 142 milliseconds

12