Lines Matching refs:ptr
153 static void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in _mysqlnd_erealloc() argument
157 …size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : … 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()
173 static void * _mysqlnd_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) in _mysqlnd_perealloc() argument
177 …size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : … in _mysqlnd_perealloc()
179 …TRACE_ALLOC_INF_FMT("ptr=%p old_size=%zu new_size=%zu persistent=%u", ptr, old_size, new_size, p… in _mysqlnd_perealloc()
180 ret = perealloc_rel(REAL_PTR(ptr), REAL_SIZE(new_size), persistent); in _mysqlnd_perealloc()
196 static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) in _mysqlnd_efree()
208 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_efree()
210 if (ptr) { in _mysqlnd_efree()
212 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_efree()
213 TRACE_ALLOC_INF_FMT("ptr=%p size=%zu", ((char*)ptr) - sizeof(size_t), free_amount); in _mysqlnd_efree()
215 efree_rel(REAL_PTR(ptr)); in _mysqlnd_efree()
227 static void _mysqlnd_pefree(void *ptr, bool persistent MYSQLND_MEM_D) in _mysqlnd_pefree() argument
239 TRACE_ALLOC_INF_FMT("ptr=%p persistent=%u", ptr, persistent); in _mysqlnd_pefree()
241 if (ptr) { in _mysqlnd_pefree()
243 free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); in _mysqlnd_pefree()
244 TRACE_ALLOC_INF_FMT("ptr=%p size=%zu", ((char*)ptr) - sizeof(size_t), free_amount); in _mysqlnd_pefree()
246 pefree_rel(REAL_PTR(ptr), persistent); in _mysqlnd_pefree()
259 static char * _mysqlnd_pememdup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM_… in _mysqlnd_pememdup() argument
271 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pememdup()
276 memcpy(dest, ptr, length); in _mysqlnd_pememdup()
290 static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, bool persistent MYSQLND_MEM… in _mysqlnd_pestrndup() argument
302 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pestrndup()
307 char * p = (char *) ptr; in _mysqlnd_pestrndup()
331 static char * _mysqlnd_pestrdup(const char * const ptr, bool persistent MYSQLND_MEM_D) in _mysqlnd_pestrdup() argument
335 const char * p = ptr; in _mysqlnd_pestrdup()
344 TRACE_ALLOC_INF_FMT("ptr=%p", ptr); in _mysqlnd_pestrdup()
398 static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) in mysqlnd_zend_mm_erealloc() argument
400 return erealloc_rel(ptr, new_size); in mysqlnd_zend_mm_erealloc()
406 static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_perealloc() argument
408 return perealloc_rel(ptr, new_size, persistent); in mysqlnd_zend_mm_perealloc()
414 static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D) in mysqlnd_zend_mm_efree()
416 efree_rel(ptr); in mysqlnd_zend_mm_efree()
422 static void mysqlnd_zend_mm_pefree(void * ptr, bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_pefree() argument
424 pefree_rel(ptr, persistent); in mysqlnd_zend_mm_pefree()
430 static char * mysqlnd_zend_mm_pememdup(const char * const ptr, size_t length, bool persistent MYSQL… in mysqlnd_zend_mm_pememdup() argument
434 memcpy(dest, ptr, length); in mysqlnd_zend_mm_pememdup()
442 static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, bool persistent MYSQ… in mysqlnd_zend_mm_pestrndup() argument
444 return persistent? zend_strndup(ptr, length ) : estrndup_rel(ptr, length); in mysqlnd_zend_mm_pestrndup()
450 static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, bool persistent MYSQLND_MEM_D) in mysqlnd_zend_mm_pestrdup() argument
452 return pestrdup_rel(ptr, persistent); in mysqlnd_zend_mm_pestrdup()