Lines Matching refs:ptr
55 void *ptr = k_malloc(size); in heap_caps_malloc_base() local
57 if (!ptr && size > 0) { in heap_caps_malloc_base()
61 return ptr; in heap_caps_malloc_base()
86 static void *heap_caps_realloc_base( void *ptr, size_t size, uint32_t caps) in heap_caps_realloc_base() argument
88 ptr = k_realloc(ptr, size); in heap_caps_realloc_base()
90 if (ptr == NULL && size > 0) { in heap_caps_realloc_base()
94 return ptr; in heap_caps_realloc_base()
97 void *heap_caps_realloc( void *ptr, size_t size, uint32_t caps) in heap_caps_realloc() argument
99 return heap_caps_realloc_base(ptr, size, caps); in heap_caps_realloc()
102 void *heap_caps_realloc_default( void *ptr, size_t size ) in heap_caps_realloc_default() argument
104 return heap_caps_realloc_base(ptr, size, MALLOC_CAP_DEFAULT); in heap_caps_realloc_default()
107 void *heap_caps_realloc_prefer( void *ptr, size_t size, size_t num, ... ) in heap_caps_realloc_prefer() argument
109 return heap_caps_realloc_base(ptr, size, MALLOC_CAP_DEFAULT); in heap_caps_realloc_prefer()
112 void heap_caps_free( void *ptr) in heap_caps_free() argument
114 k_free(ptr); in heap_caps_free()
130 void *ptr = heap_caps_calloc_base(n, size, caps); in heap_caps_calloc() local
132 if (!ptr && size > 0) { in heap_caps_calloc()
136 return ptr; in heap_caps_calloc()
204 size_t heap_caps_get_allocated_size( void *ptr ) in heap_caps_get_allocated_size() argument
211 void *ptr = k_aligned_alloc(alignment, size); in heap_caps_aligned_alloc() local
213 if (!ptr && size > 0) { in heap_caps_aligned_alloc()
217 return ptr; in heap_caps_aligned_alloc()
220 void heap_caps_aligned_free(void *ptr) in heap_caps_aligned_free() argument
222 heap_caps_free(ptr); in heap_caps_aligned_free()
232 void *ptr = heap_caps_aligned_alloc(alignment, size_bytes, caps); in heap_caps_aligned_calloc() local
233 if (ptr != NULL) { in heap_caps_aligned_calloc()
234 memset(ptr, 0, size_bytes); in heap_caps_aligned_calloc()
237 return ptr; in heap_caps_aligned_calloc()