STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
new.h
Go to the documentation of this file.
1 //
2 // new.h
3 //
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // The C++ memory allocation library functionality
7 //
8 #pragma once
9 #define _INC_NEW
10 
11 #include <corecrt.h>
12 #include <vcruntime_new_debug.h>
13 
14 #ifdef __cplusplus
15 
16  #if !defined _MSC_EXTENSIONS && !defined _CRTBLD && !defined _CORECRT_BUILD
17  #include <new>
18  #endif
19 
20  #if defined _MSC_EXTENSIONS && !defined _CORECRT_BUILD
21  #include <crtdefs.h>
22 
23  namespace std
24  {
25  typedef void (__CRTDECL* new_handler)();
26 
27  #ifdef _M_CEE
28  typedef void (__clrcall* _new_handler_m) ();
29  #endif
30 
31  _CRTIMP2 new_handler __cdecl set_new_handler(_In_opt_ new_handler _NewHandler) throw();
32  }
33 
34  #ifdef _M_CEE
35  using std::_new_handler_m;
36  #endif
37 
38  using std::new_handler;
40  #endif
41 
42 #endif // __cplusplus
43 
44 
45 
47 
48 
49 
50 typedef int (__CRTDECL* _PNH)(size_t);
51 
52 _PNH __cdecl _query_new_handler(void);
53 _PNH __cdecl _set_new_handler(_In_opt_ _PNH _NewHandler);
54 
55 // new mode flag -- when set, makes malloc() behave like new()
56 _ACRTIMP int __cdecl _query_new_mode(void);
57 _ACRTIMP int __cdecl _set_new_mode(_In_ int _NewMode);
58 
59 
60 
#define _ACRTIMP
Definition: corecrt.h:27
_PNH __cdecl _set_new_handler(_In_opt_ _PNH _NewHandler)
unsigned int size_t
Definition: sourceannotations.h:19
_ACRTIMP int __cdecl _query_new_mode(void)
STL namespace.
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
#define __CRTDECL
Definition: vcruntime.h:156
#define _In_
Definition: sal.h:305
#define _In_opt_
Definition: sal.h:306
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
_PNH __cdecl _query_new_handler(void)
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
#define _CRTIMP2
Definition: crtdefs.h:36
_ACRTIMP int __cdecl _set_new_mode(_In_ int _NewMode)
_CRTIMP2 new_handler __cdecl set_new_handler(_In_opt_ new_handler) _THROW0()
_CRT_BEGIN_C_HEADER typedef int(__CRTDECL *_PNH)(size_t)