Memory management

I think something like http://developer.download.nvidia.com/opengl/specs/GL_NVX_gpu_memory_info.txt is good enough. This extension gives you rough estimation about current memory usage. I believe memory management can be done based on that.