Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • As an afterthought, there may also be differences in program behaviour when A or B are too large to fit in the heap or data segment, respectively. If B is too large, then new B ought to throw std::bad_alloc. In the case of A, I'm not sure whether a catchable exception is thrown, or if the program will just seg-fault and die. Commented Jan 19, 2016 at 6:35