Leaked source code of windows server 2003
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.

26 lines
530 B

  1. #ifndef __CRTFREE_H_
  2. #define __CRTFREE_H_
  3. //
  4. // Code to help free modules from the bondage and tyranny of CRT libraries
  5. //
  6. // Include this header in a single component and #define CPP_FUNCTIONS
  7. //
  8. void * __cdecl operator new(size_t nSize)
  9. {
  10. // Zero init just to save some headaches
  11. return((LPVOID)LocalAlloc(LPTR, nSize));
  12. }
  13. void __cdecl operator delete(void *pv)
  14. {
  15. LocalFree((HLOCAL)pv);
  16. }
  17. extern "C" int __cdecl _purecall(void) {return 0;}
  18. #endif // __CRTFREE_H_