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.

48 lines
1.1 KiB

  1. /***
  2. *new.h - declarations and definitions for C++ memory allocation functions
  3. *
  4. * Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Contains the function declarations for C++ memory allocation functions.
  8. *
  9. ****/
  10. #ifndef _INC_NEW
  11. #ifdef __cplusplus
  12. /* constants for based heap routines */
  13. #define _NULLSEG ((__segment)0)
  14. #define _NULLOFF ((void __based(void) *)0xffff)
  15. /* types and structures */
  16. #ifndef _SIZE_T_DEFINED
  17. typedef unsigned int size_t;
  18. #define _SIZE_T_DEFINED
  19. #endif
  20. typedef int (__cdecl * _PNH)( size_t );
  21. typedef int (__cdecl * _PNHH)( unsigned long, size_t );
  22. typedef int (__cdecl * _PNHB)( __segment, size_t );
  23. /* function prototypes */
  24. _PNH __cdecl _set_new_handler( _PNH );
  25. _PNH __cdecl _set_nnew_handler( _PNH );
  26. _PNH __cdecl _set_fnew_handler( _PNH );
  27. _PNHH __cdecl _set_hnew_handler( _PNHH );
  28. _PNHB __cdecl _set_bnew_handler( _PNHB );
  29. #else
  30. /* handler functions only supported in C++, emit appropriate error */
  31. #error Functions declared in new.h can only be used in C++ source
  32. #endif
  33. #define _INC_NEW
  34. #endif