Lines Matching refs:ptr
228 static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in _mysqlnd_erealloc() argument
232 …size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : … in _mysqlnd_erealloc()
241 TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size); in _mysqlnd_erealloc()
246 ret = erealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_erealloc()
251 TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size); in _mysqlnd_erealloc()
252 ret = erealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_erealloc()
266 static void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_perealloc() argument
270 …size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : … in _mysqlnd_perealloc()
279 …TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, p… in _mysqlnd_perealloc()
284 ret = perealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size), persistent); in _mysqlnd_perealloc()
289 …TRACE_ALLOC_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, p… in _mysqlnd_perealloc()
290 ret = perealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size), persistent); in _mysqlnd_perealloc()
307 static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) in _mysqlnd_efree()
319 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_efree()
321 if (ptr) { in _mysqlnd_efree()
323 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_efree()
324 TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); in _mysqlnd_efree()
326 efree_rel(REAL_PTR(ptr)); in _mysqlnd_efree()
338 static void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_pefree() argument
350 TRACE_ALLOC_INF_FMT("ptr=%p persistent=%u", ptr, persistent); in _mysqlnd_pefree()
352 if (ptr) { in _mysqlnd_pefree()
354 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_pefree()
355 TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); in _mysqlnd_pefree()
357 pefree_rel(REAL_PTR(ptr), persistent); in _mysqlnd_pefree()
440 static void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) in _mysqlnd_realloc() argument
452 TRACE_ALLOC_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr); in _mysqlnd_realloc()
458 ret = realloc(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_realloc()
463 TRACE_ALLOC_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr); in _mysqlnd_realloc()
465 ret = realloc(REAL_PTR(ptr), REAL_SIZE(new_size)); in _mysqlnd_realloc()
480 static void _mysqlnd_free(void *ptr MYSQLND_MEM_D) in _mysqlnd_free()
492 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_free()
494 if (ptr) { in _mysqlnd_free()
496 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_free()
497 TRACE_ALLOC_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); in _mysqlnd_free()
499 free(REAL_PTR(ptr)); in _mysqlnd_free()
511 static char * _mysqlnd_pememdup(const char * const ptr, size_t length, zend_bool persistent MYSQLND… in _mysqlnd_pememdup() argument
523 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pememdup()
528 memcpy(dest, ptr, length); in _mysqlnd_pememdup()
542 static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLN… in _mysqlnd_pestrndup() argument
554 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pestrndup()
559 char * p = (char *) ptr; in _mysqlnd_pestrndup()
583 static char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) in _mysqlnd_pestrdup() argument
587 const char * p = ptr; in _mysqlnd_pestrdup()
596 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pestrdup()
683 static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in mysqlnd_zend_mm_erealloc() argument
685 return erealloc_rel(ptr, new_size); in mysqlnd_zend_mm_erealloc()
691 static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_ME… in mysqlnd_zend_mm_perealloc() argument
693 return perealloc_rel(ptr, new_size, persistent); in mysqlnd_zend_mm_perealloc()
699 static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D) in mysqlnd_zend_mm_efree()
701 efree_rel(ptr); in mysqlnd_zend_mm_efree()
707 static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_pefree() argument
709 pefree_rel(ptr, persistent); in mysqlnd_zend_mm_pefree()
731 static void * mysqlnd_zend_mm_realloc(void * ptr, size_t new_size MYSQLND_MEM_D) in mysqlnd_zend_mm_realloc() argument
733 return realloc(ptr, new_size); in mysqlnd_zend_mm_realloc()
739 static void mysqlnd_zend_mm_free(void * ptr MYSQLND_MEM_D) in mysqlnd_zend_mm_free()
741 free(ptr); in mysqlnd_zend_mm_free()
747 static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, zend_bool persistent … in mysqlnd_zend_mm_pememdup() argument
751 memcpy(dest, ptr, length); in mysqlnd_zend_mm_pememdup()
759 static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent… in mysqlnd_zend_mm_pestrndup() argument
761 return persistent? zend_strndup(ptr, length ) : estrndup_rel(ptr, length); in mysqlnd_zend_mm_pestrndup()
767 static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_pestrdup() argument
769 return pestrdup_rel(ptr, persistent); in mysqlnd_zend_mm_pestrdup()