nonewthrow.c 220 B

123456789101112131415161718
  1. void *operator new(size_t size)
  2. {
  3. return malloc(size);
  4. }
  5. void *operator new[](size_t size)
  6. {
  7. return malloc(size);
  8. }
  9. void operator delete(void *ptr)
  10. {
  11. free(ptr);
  12. }
  13. void operator delete[](void *ptr)
  14. {
  15. free(ptr);
  16. }