In these situations, whether bad_alloc will be thrown?
1. Memory is reserved, even if not used. No "enough" memory to new operator (which reflects not enough memory for VirtualAlloc, even if not used (committed), but reserved);
2. The heap's internal data structures could be corrupted such that it cannot find the next free block (no pointer to the next free block), which would make it think it is out of memory.
3. The heap's internal data structures could be corrupted so that it points to random memory location, which could cause a crash, or try to give you memory that was still in use.
My option, (1) and (2) will throw bad_alloc, for (3) structured exception (access violation) will be thrown?
thanks in advance,