[PATCH 4/9] lib/ref_tracker: add printing to memory buffer