Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. void * operator new(size_t size) _THROW1(_STD bad_alloc)
  2. { // try to allocate size bytes
  3. void *p;
  4. while ((p = malloc(size)) == 0)
  5. if (_callnewh(size) == 0)
  6. { // report no memory
  7. static const std::bad_alloc nomem;
  8. _RAISE(nomem);
  9. }
  10. return (p);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement