Automating Memory Management in Data Analytics