MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_free_align

Function rt_free_align

src/kservice.c:1058–1066  ·  view source on GitHub ↗

* @brief This function release the memory block, which is allocated by * rt_malloc_align function and address is aligned. * * @param ptr is the memory block pointer. */

Source from the content-addressed store, hash-verified

1056 * @param ptr is the memory block pointer.
1057 */
1058rt_weak void rt_free_align(void *ptr)
1059{
1060 void *real_ptr = RT_NULL;
1061
1062 /* NULL check */
1063 if (ptr == RT_NULL) return;
1064 real_ptr = (void *) * (rt_uintptr_t *)((rt_uintptr_t)ptr - sizeof(void *));
1065 rt_free(real_ptr);
1066}
1067RTM_EXPORT(rt_free_align);
1068#endif /* RT_USING_HEAP */
1069

Callers 15

lwp_freeFunction · 0.85
uma_zfreeFunction · 0.85
virtio_queue_initFunction · 0.85
virtio_queue_destroyFunction · 0.85
nvme_blk_rwFunction · 0.85
nvme_scan_deviceFunction · 0.85
usbh_serial_writeFunction · 0.85
usbd_serial_writeFunction · 0.85
rt_udisk_readFunction · 0.85
rt_udisk_writeFunction · 0.85
gicv3_its_irq_alloc_msiFunction · 0.85

Calls 1

rt_freeFunction · 0.85

Tested by 2

test_pdma_txFunction · 0.68
test_pdma_rxFunction · 0.68