Lines Matching refs:ptr
43 void k_free(void *ptr) in k_free() argument
47 if (ptr != NULL) { in k_free()
48 heap_ref = ptr; in k_free()
50 ptr = heap_ref; in k_free()
54 k_heap_free(*heap_ref, ptr); in k_free()
117 void *k_realloc(void *ptr, size_t size) in k_realloc() argument
123 k_free(ptr); in k_realloc()
126 if (ptr == NULL) { in k_realloc()
129 heap_ref = ptr; in k_realloc()
130 ptr = --heap_ref; in k_realloc()
133 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_heap_sys, k_realloc, heap, ptr); in k_realloc()
136 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_heap_sys, k_realloc, heap, ptr, NULL); in k_realloc()
140 ret = k_heap_realloc(heap, ptr, size, K_NO_WAIT); in k_realloc()
147 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_heap_sys, k_realloc, heap, ptr, ret); in k_realloc()