Optimized memory usage gathering