modules/woz_uwb/src/facade/woz_alloc.h
asxeem/openaliro
Module
woz_alloc.h
Memory allocation and timing facade: qmalloc, qcalloc, qfree wrap the platform heap…
Overview
Memory allocation and timing facade: qmalloc, qcalloc, qfree wrap the platform heap; qrtc_get_us returns monotonic microseconds since boot.
depends on woz_port.h · used by aliro_uwb_adapter.c aliro_uwb_msg.c aliro_uwb_msg_builder.c aliro_uwb_session.c cherry_ccc_shim.c uwb_rxdiag.c
API
Fstatic inline void *qmalloc(size_t size)
modules/woz_uwb/src/facade/woz_alloc.h:21
Allocate size bytes.
size- Number of bytes to allocate.
- returns
- Pointer to allocated memory, or NULL on failure.
Fstatic inline void *qcalloc(size_t nb_items, size_t item_size)
modules/woz_uwb/src/facade/woz_alloc.h:32
Allocate and zero-initialize nb_items elements of item_size bytes each.
nb_items- Number of items.
item_size- Bytes per item.
- returns
- Pointer to allocated and zeroed memory, or NULL on failure.
Fstatic inline void qfree(void *ptr)
modules/woz_uwb/src/facade/woz_alloc.h:41
Deallocate memory previously allocated by qmalloc or qcalloc.
ptr- Pointer to memory to free (may be NULL).
Fstatic inline int64_t qrtc_get_us(void)
modules/woz_uwb/src/facade/woz_alloc.h:50
Monotonic microseconds since boot.
- returns
- Microseconds elapsed since system start.