   General Kernel / Driver / OS Question
  I've always wondered about the following:Let's say an OpenGL application creates a number of texture Objects. This requires your video card driver to allocate some kernel resources. Now say your application exits unexpectedly. How can the the video card driver possible deallocate those resources? Are those resources now dangling and irrecoverable until a restart?Feel free to answer this question in the context of a number of Operating systems, but I am particularly interested in Windows, OS X and Linux.   
  The data on the video card is just trashed when the program dies (generally speaking; there are special cases).The data allocated in main system RAM is recovered, just like all other data, because the pages dedicated to the program are recovered. I believe under Windows the driver also has its own memory (the paged pool, which is the cause of some annoying Source engine errors), but I assume that's reclaimed as well.   ;Quote:Original post by Edward RoppleThe data on the video card is just trashed when the program dies (generally speaking; there are special cases).The data allocated in main system RAM is recovered, just like all other data, because the pages dedicated to the program are recovered. I believe under Windows the driver also has its own memory (the paged pool, which is the cause of some annoying Source engine errors), but I assume that's reclaimed as well.I know that when a user space application crashes its virtual address space is destroyed thereby recovering thoes resources. But how can the video card driver detect that the OpenGL context was abruptly trashed?   ;  I doubt that it does detect that the program was immediately killed, any more than alt-tabbing out of a program (you have to reload data then, too). But I'm not a driver writer.   