added memory usage stat to examples