Started to play with memory sampling in orcc. Fix some minor issues to have it working properly