20 #define _HEAP_MAXREQ 0xFFFFFFFFFFFFFFE0
22 #define _HEAP_MAXREQ 0xFFFFFFE0
28 #define _HEAPEMPTY (-1)
30 #define _HEAPBADBEGIN (-3)
31 #define _HEAPBADNODE (-4)
33 #define _HEAPBADPTR (-6)
48 #define _mm_free(a) _aligned_free(a)
49 #define _mm_malloc(a, b) _aligned_malloc(a, b)
58 #if !defined __midl && !defined RC_INVOKED
65 #if defined _DEBUG || defined _CRT_USE_WINAPI_FAMILY_DESKTOP_APP || defined _CORECRT_BUILD
69 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
75 #define _ALLOCA_S_THRESHOLD 1024
76 #define _ALLOCA_S_STACK_MARKER 0xCCCC
77 #define _ALLOCA_S_HEAP_MARKER 0xDDDD
80 #define _ALLOCA_S_MARKER_SIZE 16
82 #define _ALLOCA_S_MARKER_SIZE 8
89 #pragma warning(disable:6540)
95 *((
unsigned int*)_Ptr) = _Marker;
104 return _MarkedSize > _Size ? _MarkedSize : 0;
115 #ifndef _CRTDBG_MAP_ALLOC
117 #define _malloca(size) \
118 __pragma(warning(suppress: 6255 6386)) \
119 (_MallocaComputeSize(size) != 0 \
120 ? _MarkAllocaS(malloc(_MallocaComputeSize(size)), _ALLOCA_S_HEAP_MARKER) \
127 #define _malloca(size) \
128 __pragma(warning(suppress: 6255 6386)) \
129 (_MallocaComputeSize(size) != 0 \
130 ? (((_MallocaComputeSize(size) <= _ALLOCA_S_THRESHOLD) \
131 ? _MarkAllocaS(_alloca(_MallocaComputeSize(size)), _ALLOCA_S_STACK_MARKER) \
132 : _MarkAllocaS(malloc(_MallocaComputeSize(size)), _ALLOCA_S_HEAP_MARKER))) \
139 #if defined __midl && !defined RC_INVOKED
140 #elif defined _DEBUG && defined _CRTDBG_MAP_ALLOC
145 #pragma warning(push)
146 #pragma warning(disable: 6014)
149 unsigned int _Marker;
153 _Marker = *(
unsigned int*)_Memory;
161 _ASSERTE((
"Corrupted pointer passed to _freea" && 0));
172 #if _CRT_INTERNAL_NONSTDC_NAMES
173 #define alloca _alloca
#define _ACRTIMP
Definition: corecrt.h:27
struct _heapinfo _HEAPINFO
#define _ALLOCA_S_MARKER_SIZE
Definition: malloc.h:82
_ACRTIMP int __cdecl _heapwalk(_Inout_ _HEAPINFO *_EntryInfo)
#define _Out_opt_
Definition: sal.h:343
_ACRTIMP void __cdecl free(_Pre_maybenull_ _Post_invalid_ void *_Block)
#define _ALLOCA_S_STACK_MARKER
Definition: malloc.h:76
__inline void * _MarkAllocaS(_Out_opt_ __crt_typefix(unsigned int *) void *_Ptr, unsigned int _Marker)
Definition: malloc.h:91
_Ret_notnull_ _Post_writable_byte_size_(_Size) void *__cdecl _alloca(_In_ size_t _Size)
#define __crt_typefix(ctype)
Definition: corecrt.h:108
_Check_return_ _DCRTIMP int __cdecl _heapmin(void)
#define _Post_invalid_
Definition: sal.h:692
_DCRTIMP int __cdecl _resetstkoflw(void)
__inline void __CRTDECL _freea(_Pre_maybenull_ _Post_invalid_ void *_Memory)
Definition: malloc.h:147
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
_Check_return_ _DCRTIMP int __cdecl _heapchk(void)
__inline size_t _MallocaComputeSize(size_t _Size)
Definition: malloc.h:101
#define _ALLOCA_S_HEAP_MARKER
Definition: malloc.h:77
#define __CRTDECL
Definition: vcruntime.h:156
size_t _size
Definition: malloc.h:42
#define _Pre_maybenull_
Definition: sal.h:678
#define _Check_return_
Definition: sal.h:554
#define _ASSERTE(expr)
Definition: crtdbg.h:707
#define _In_
Definition: sal.h:305
#define _DCRTIMP
Definition: corecrt.h:43
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
int _useflag
Definition: malloc.h:43
int intptr_t
Definition: vcruntime.h:200
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
#define _Ret_notnull_
Definition: sal.h:525
_STATIC_ASSERT(sizeof(unsigned int)<=_ALLOCA_S_MARKER_SIZE)
#define _Inout_
Definition: sal.h:375
int * _pentry
Definition: malloc.h:41
_ACRTIMP intptr_t __cdecl _get_heap_handle(void)