implement first design of safeSummary and safeFree : bad memory access occur