ReactOS 0.4.16-dev-1059-gb1cf981
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#ifndef _INC_NEW // include guard for 3rd party interop
10#define _INC_NEW
11
12#include <corecrt.h>
13#include <vcruntime_new_debug.h>
14
15#ifdef __cplusplus
16
17 #if !defined _MSC_EXTENSIONS && !defined _CRTBLD && !defined _CORECRT_BUILD
18 #include <new>
19 #endif
20
21 #if defined _MSC_EXTENSIONS && !defined _CORECRT_BUILD
22 #include <crtdefs.h>
23
24 namespace std
25 {
26 typedef void (__CRTDECL* new_handler)();
27
28 #ifdef _M_CEE
29 typedef void (__clrcall* _new_handler_m) ();
30 #endif
31
32 _CRTIMP2 new_handler __cdecl set_new_handler(_In_opt_ new_handler _NewHandler) throw();
33 }
34
35 #ifdef _M_CEE
36 using ::std::_new_handler_m;
37 #endif
38
39 using ::std::new_handler;
40 using ::std::set_new_handler;
41 #endif
42
43#endif // __cplusplus
44
45#pragma warning(push)
46#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
48
50
51
52
53typedef int (__CRTDECL* _PNH)(size_t);
54
56_PNH __cdecl _set_new_handler(_In_opt_ _PNH _NewHandler);
57
58// new mode flag -- when set, makes malloc() behave like new()
61
62
63
66#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
67
68#endif // _INC_NEW
#define __cdecl
Definition: accygwin.h:79
#define _CRTIMP2
Definition: crtdefs.h:88
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
__kernel_size_t size_t
Definition: linux.h:237
Definition: features.h:417
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
MSVCRT_new_handler_func CDECL set_new_handler(void *func)
Definition: heap.c:238
#define _ACRTIMP
Definition: corecrt.h:138
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
_PNH __cdecl _query_new_handler(void)
Definition: heap.c:208
_ACRTIMP int __cdecl _query_new_mode(void)
Definition: heap.c:217
_ACRTIMP int __cdecl _set_new_mode(_In_ int _NewMode)
_PNH __cdecl _set_new_handler(_In_opt_ _PNH _NewHandler)
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40
#define __CRTDECL
Definition: yvals.h:17