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
796 B

  1. /***
  2. *newmode.c - set new() handler mode to handle malloc failures
  3. *
  4. * Copyright (c) 1994-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Sets the global flag which controls whether the new() handler
  8. * is called on malloc failures. The default behavior in Visual
  9. * C++ v2.0 and later is not to, that malloc failures return NULL
  10. * without calling the new handler. Linking with this object changes
  11. * the start-up behavior to call the new handler on malloc failures.
  12. *
  13. *Revision History:
  14. * 03-04-94 SKS Original version.
  15. *
  16. *******************************************************************************/
  17. #ifndef _POSIX_
  18. #include <internal.h>
  19. /* enable new handler calls upon malloc failures */
  20. int _newmode = 1; /* Malloc New Handler MODE */
  21. #endif