Lines Matching refs:ptr
48 void *ptr = malloc(size); in heap_caps_malloc_base() local
50 if (!ptr && size > 0) { in heap_caps_malloc_base()
54 return ptr; in heap_caps_malloc_base()
81 static void *heap_caps_realloc_base( void *ptr, size_t size, uint32_t caps) in heap_caps_realloc_base() argument
83 ptr = realloc(ptr, size); in heap_caps_realloc_base()
85 if (ptr == NULL && size > 0) { in heap_caps_realloc_base()
89 return ptr; in heap_caps_realloc_base()
92 void *heap_caps_realloc( void *ptr, size_t size, uint32_t caps) in heap_caps_realloc() argument
94 return heap_caps_realloc_base(ptr, size, caps); in heap_caps_realloc()
97 void *heap_caps_realloc_default( void *ptr, size_t size ) in heap_caps_realloc_default() argument
99 return heap_caps_realloc_base(ptr, size, MALLOC_CAP_DEFAULT); in heap_caps_realloc_default()
102 void *heap_caps_realloc_prefer( void *ptr, size_t size, size_t num, ... ) in heap_caps_realloc_prefer() argument
104 return heap_caps_realloc_base(ptr, size, MALLOC_CAP_DEFAULT); in heap_caps_realloc_prefer()
107 void heap_caps_free( void *ptr) in heap_caps_free() argument
109 free(ptr); in heap_caps_free()
125 void *ptr = heap_caps_calloc_base(n, size, caps); in heap_caps_calloc() local
127 if (!ptr && size > 0) { in heap_caps_calloc()
131 return ptr; in heap_caps_calloc()
194 size_t heap_caps_get_allocated_size( void *ptr ) in heap_caps_get_allocated_size() argument
201 void *ptr = aligned_alloc(alignment, size); in heap_caps_aligned_alloc() local
203 if (!ptr && size > 0) { in heap_caps_aligned_alloc()
207 return ptr; in heap_caps_aligned_alloc()
210 void heap_caps_aligned_free(void *ptr) in heap_caps_aligned_free() argument
212 heap_caps_free(ptr); in heap_caps_aligned_free()
222 void *ptr = heap_caps_aligned_alloc(alignment, size_bytes, caps); in heap_caps_aligned_calloc() local
223 if (ptr != NULL) { in heap_caps_aligned_calloc()
224 memset(ptr, 0, size_bytes); in heap_caps_aligned_calloc()
227 return ptr; in heap_caps_aligned_calloc()