optional memory heap print