Lines Matching refs:ptr

245 static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D)  in _mysqlnd_erealloc()  argument
249 …size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : … in _mysqlnd_erealloc()
261 TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size); in _mysqlnd_erealloc()
267 ret = erealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_erealloc()
286 static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_perealloc() argument
290 …size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : … in _mysqlnd_perealloc()
302 …TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, p… in _mysqlnd_perealloc()
308 ret = perealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size), persistent); in _mysqlnd_perealloc()
330 static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) in _mysqlnd_efree()
342 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_efree()
344 if (ptr) { in _mysqlnd_efree()
346 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_efree()
347 TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); in _mysqlnd_efree()
349 efree_rel(REAL_PTR(ptr)); in _mysqlnd_efree()
361 static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_pefree() argument
373 TRACE_ALLOC_INF_FMT("ptr=%p persistent=%u", ptr, persistent); in _mysqlnd_pefree()
375 if (ptr) { in _mysqlnd_pefree()
377 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_pefree()
378 TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); in _mysqlnd_pefree()
380 pefree_rel(REAL_PTR(ptr), persistent); in _mysqlnd_pefree()
471 static void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) in _mysqlnd_realloc() argument
486 TRACE_ALLOC_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr); in _mysqlnd_realloc()
493 ret = realloc(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_realloc()
513 static void _mysqlnd_free(void *ptr MYSQLND_MEM_D) in _mysqlnd_free()
525 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_free()
527 if (ptr) { in _mysqlnd_free()
529 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_free()
530 TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); in _mysqlnd_free()
532 free(REAL_PTR(ptr)); in _mysqlnd_free()
544 static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND… in _mysqlnd_pememdup() argument
556 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pememdup()
561 memcpy(dest, ptr, length); in _mysqlnd_pememdup()
575 static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLN… in _mysqlnd_pestrndup() argument
587 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pestrndup()
592 char * p = (char *) ptr; in _mysqlnd_pestrndup()
616 static char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_pestrdup() argument
620 const char * p = ptr; in _mysqlnd_pestrdup()
629 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pestrdup()
716 static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in mysqlnd_zend_mm_erealloc() argument
718 return erealloc_rel(ptr, new_size); in mysqlnd_zend_mm_erealloc()
724 static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_ME… in mysqlnd_zend_mm_perealloc() argument
726 return perealloc_rel(ptr, new_size, persistent); in mysqlnd_zend_mm_perealloc()
732 static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D) in mysqlnd_zend_mm_efree()
734 efree_rel(ptr); in mysqlnd_zend_mm_efree()
740 static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_pefree() argument
742 pefree_rel(ptr, persistent); in mysqlnd_zend_mm_pefree()
764 static void * mysqlnd_zend_mm_realloc(void * ptr, size_t new_size MYSQLND_MEM_D) in mysqlnd_zend_mm_realloc() argument
766 return realloc(ptr, new_size); in mysqlnd_zend_mm_realloc()
772 static void mysqlnd_zend_mm_free(void * ptr MYSQLND_MEM_D) in mysqlnd_zend_mm_free()
774 free(ptr); in mysqlnd_zend_mm_free()
780 static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, zend_bool persistent … in mysqlnd_zend_mm_pememdup() argument
784 memcpy(dest, ptr, length); in mysqlnd_zend_mm_pememdup()
792 static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent… in mysqlnd_zend_mm_pestrndup() argument
794 return persistent? zend_strndup(ptr, length ) : estrndup_rel(ptr, length); in mysqlnd_zend_mm_pestrndup()
800 static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_pestrdup() argument
802 return pestrdup_rel(ptr, persistent); in mysqlnd_zend_mm_pestrdup()