Write a function to calculate a rolling average over a specific window size without using built-in high-level functions, optimizing for memory usage.