#define TIMEOUT_DELAY 50000 /* 50000 us = 50 ms */
#define TIMEOUT_RETRIES 20 /* 20 * 50 ms = 1 s */

/*
 * attempts to allocate memory every 50 ms for 1000 ms, returns like malloc(3)
 * would have if errors other than ENOMEM are encountered or if it times out
 *
 * returns immediately upon success.
 */
void *ra_malloc (size_t size);

/*
 * attempts to re-allocate memory every 50 ms for 1000 ms, returns like
 * malloc(3)would have if errors other than ENOMEM are encountered or if it
 * times out
 *
 * returns immediately upon success.
 */
void *ra_realloc (void *ptr, size_t size);

