Memory logging script.