You still have a bug there since in the case of no alignment the free routine will fail. (uint8_t *) mem_ptr - *((uint8_t *) mem_ptr - 1) is the same as (uint8_t *) mem_ptr which is not the pointer to the allocated memory. By the way, why not set the default alignment to something more reasonable than 1 ? Ilan