Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
396 B

  1. // Copyright (c) 1999 Microsoft Corporation
  2. // OpNew.cpp
  3. //
  4. // Override operator new[] so that we ignore the new_handler mechanism.
  5. //
  6. //
  7. #include <windows.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include "Debug.h"
  11. LPVOID __cdecl operator new(size_t cbBuffer)
  12. {
  13. LPVOID p;
  14. p = malloc(cbBuffer ? cbBuffer : 1);
  15. return p;
  16. }
  17. void __cdecl operator delete(LPVOID p)
  18. {
  19. free(p);
  20. }