Merge changes I604c980d,Ied97ce94

* changes:
  Catch more allocation failure cases
  Use new (std::nothrow) throughout