When I try to capture a frame the debugger generates an OOM exception.
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
My (open-source) application is 32 bits so address space is limited but 2GB is still available to dump the data.
I notice the crash always appears when glFlushMappedBufferRange is called. It is working if I use the old/slow glBufferSubData function to upload vertex data. So the high memory consumption is related to glFlushMappedBufferRange.
My application uses persistent and big buffers (around 8MB) for vertex streaming.
I suspect that the debugger copy the full buffer instead of a couple of useful byte or there is potentially a memory leak.