ReactOS 0.4.16-dev-853-g88d9285
|
#include <corecrt_internal.h>
#include <malloc.h>
#include <minmax.h>
#include <new.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | _CrtMemBlockHeader |
struct | _AlignMemBlockHdr |
Macros | |
#define | _DEBUG |
#define | _ALLOCATION_FILE_LINENUM "\nMemory allocated at %hs(%d).\n" |
#define | IS_2_POW_N(X) ((X) != 0 && ((X) & ((X) - 1)) == 0) |
Definition at line 27 of file debug_heap.cpp.
#define _DEBUG |
Definition at line 10 of file debug_heap.cpp.
Definition at line 1783 of file debug_heap.cpp.
__acrt_lock | ( | __acrt_heap_lock | ) |
Referenced by __acrt_initialize_lowio(), __acrt_lowio_ensure_fh_exists(), __acrt_stdio_allocate_stream(), __acrt_update_thread_locale_data(), __tzset(), _alloc_osfhnd(), _cgets_s(), _cgetws_s(), _cputs(), _cputws(), _CrtCheckMemory(), _CrtDoForAllClientObjects(), _CrtIsMemoryBlock(), _CrtMemCheckpoint(), _CrtMemDumpAllObjectsSince(), _CrtSetDbgBlockType(), _CrtSetDbgFlag(), _fcloseall(), _free_locale(), _getch(), _getche(), _getwch(), _getwche(), _isindst(), _kbhit(), _pclose(), _query_new_handler(), _rmtmp(), _set_new_handler(), _tzset(), _ungetch(), _ungetwch(), _VCrtDbgReportA(), _VCrtDbgReportW(), common_getenv(), common_popen(), common_putenv(), compute_name(), ctrlevent_capture(), heap_alloc_dbg_internal(), raise(), signal(), and update_thread_multibyte_data_internal().
__declspec | ( | noinline | ) | const |
long * __p__crtBreakAlloc | ( | ) |
Definition at line 155 of file debug_heap.cpp.
int * __p__crtDbgFlag | ( | ) |
Definition at line 150 of file debug_heap.cpp.
Definition at line 1972 of file debug_heap.cpp.
void *__cdecl _aligned_malloc_dbg | ( | size_t const | size, |
size_t const | alignment, | ||
char const *const | file_name, | ||
int const | line_number | ||
) |
Definition at line 1787 of file debug_heap.cpp.
Definition at line 1917 of file debug_heap.cpp.
void *__cdecl _aligned_offset_malloc_dbg | ( | size_t const | size, |
size_t | alignment, | ||
size_t const | offset, | ||
char const *const | file_name, | ||
int const | line_number | ||
) |
Definition at line 1797 of file debug_heap.cpp.
void *__cdecl _aligned_offset_realloc_dbg | ( | void * | block, |
size_t | size, | ||
size_t | alignment, | ||
size_t | offset, | ||
const char * | file_name, | ||
int | line_number | ||
) |
Definition at line 1850 of file debug_heap.cpp.
void *__cdecl _aligned_offset_recalloc_dbg | ( | void *const | block, |
size_t const | count, | ||
size_t const | element_size, | ||
size_t const | alignment, | ||
size_t const | offset, | ||
char const *const | file_name, | ||
int const | line_number | ||
) |
Definition at line 1947 of file debug_heap.cpp.
void *__cdecl _aligned_realloc_dbg | ( | void *const | block, |
size_t const | size, | ||
size_t const | alignment, | ||
char const *const | file_name, | ||
int const | line_number | ||
) |
Definition at line 1827 of file debug_heap.cpp.
void *__cdecl _aligned_recalloc_dbg | ( | void *const | block, |
size_t const | count, | ||
size_t const | size, | ||
size_t const | alignment, | ||
char const *const | file_name, | ||
int const | line_number | ||
) |
Definition at line 1838 of file debug_heap.cpp.
_ASSERTE | ( | _CrtIsValidHeapPointer(block) | ) |
_ASSERTE | ( | is_block_type_valid(header->_block_use) | ) |
Definition at line 1256 of file debug_heap.cpp.
Referenced by validate_heap_if_required_nolock().
void __cdecl _CrtDoForAllClientObjects | ( | _CrtDoForAllClientObjectsCallback const | callback, |
void *const | context | ||
) |
Definition at line 1364 of file debug_heap.cpp.
Definition at line 1727 of file debug_heap.cpp.
_CRT_ALLOC_HOOK __cdecl _CrtGetAllocHook | ( | ) |
Definition at line 1132 of file debug_heap.cpp.
_CRT_DUMP_CLIENT __cdecl _CrtGetDumpClient | ( | ) |
Definition at line 1504 of file debug_heap.cpp.
int __cdecl _CrtIsMemoryBlock | ( | void const *const | block, |
unsigned const | size, | ||
long *const | request_number, | ||
char **const | file_name, | ||
int *const | line_number | ||
) |
Definition at line 1429 of file debug_heap.cpp.
Definition at line 1414 of file debug_heap.cpp.
int __cdecl _CrtIsValidPointer | ( | void const *const | p, |
unsigned int const | size_in_bytes, | ||
int const | read_write | ||
) |
Definition at line 1394 of file debug_heap.cpp.
void __cdecl _CrtMemCheckpoint | ( | _CrtMemState *const | state | ) |
Definition at line 1520 of file debug_heap.cpp.
int __cdecl _CrtMemDifference | ( | _CrtMemState *const | state, |
_CrtMemState const *const | old_state, | ||
_CrtMemState const *const | new_state | ||
) |
Definition at line 1571 of file debug_heap.cpp.
void __cdecl _CrtMemDumpAllObjectsSince | ( | _CrtMemState const *const | state | ) |
Definition at line 1706 of file debug_heap.cpp.
void __cdecl _CrtMemDumpStatistics | ( | _CrtMemState const *const | state | ) |
Definition at line 1748 of file debug_heap.cpp.
Definition at line 1492 of file debug_heap.cpp.
_CRT_ALLOC_HOOK __cdecl _CrtSetAllocHook | ( | _CRT_ALLOC_HOOK const | new_hook | ) |
Definition at line 1137 of file debug_heap.cpp.
Definition at line 1094 of file debug_heap.cpp.
Definition at line 1322 of file debug_heap.cpp.
_CRT_DUMP_CLIENT __cdecl _CrtSetDumpClient | ( | _CRT_DUMP_CLIENT const | new_client | ) |
Definition at line 1509 of file debug_heap.cpp.
|
static |
Definition at line 167 of file debug_heap.cpp.
Referenced by _CrtDoForAllClientObjects(), check_block(), dump_all_object_since_nolock(), free_dbg_nolock(), heap_alloc_dbg_internal(), print_block_data(), and realloc_dbg_nolock().
|
static |
Definition at line 1149 of file debug_heap.cpp.
Referenced by _CrtCheckMemory().
|
static |
Definition at line 187 of file debug_heap.cpp.
Referenced by _aligned_free_dbg(), _aligned_offset_realloc_dbg(), check_block(), free_dbg_nolock(), and is_block_an_aligned_allocation().
|
static |
Definition at line 1635 of file debug_heap.cpp.
Referenced by _CrtMemDumpAllObjectsSince().
free_dbg_nolock | ( | block | , |
actual_use | |||
) |
Definition at line 849 of file debug_heap.cpp.
|
static |
Definition at line 172 of file debug_heap.cpp.
Referenced by _aligned_msize_dbg(), _aligned_offset_malloc_dbg(), _aligned_offset_realloc_dbg(), _CrtIsMemoryBlock(), _CrtIsValidHeapPointer(), _CrtReportBlockType(), _CrtSetDbgBlockType(), free_dbg_nolock(), and realloc_dbg_nolock().
|
static |
Definition at line 445 of file debug_heap.cpp.
|
static |
Definition at line 304 of file debug_heap.cpp.
Referenced by heap_alloc_dbg().
if | ( | block | ) |
if | ( | ) |
Definition at line 798 of file debug_heap.cpp.
if | ( | requested_size | , |
static_cast< size_t > | _HEAP_MAXREQ - no_mans_land_size - sizeof(_CrtMemBlockHeader) | ||
) |
Definition at line 824 of file debug_heap.cpp.
Definition at line 206 of file debug_heap.cpp.
Referenced by dump_all_object_since_nolock().
Definition at line 249 of file debug_heap.cpp.
Referenced by free_dbg_nolock(), and realloc_dbg_nolock().
Definition at line 177 of file debug_heap.cpp.
Referenced by _CrtIsMemoryBlock(), _CrtSetDbgBlockType(), check_block(), free_dbg_nolock(), and heap_alloc_dbg_internal().
|
static |
Definition at line 1609 of file debug_heap.cpp.
Referenced by dump_all_object_since_nolock().
|
static |
Definition at line 535 of file debug_heap.cpp.
Definition at line 262 of file debug_heap.cpp.
Referenced by free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
|
static |
Definition at line 128 of file debug_heap.cpp.
Referenced by _CrtSetDbgFlag(), and validate_heap_if_required_nolock().
|
static |
Definition at line 127 of file debug_heap.cpp.
Referenced by _CrtSetDbgFlag(), and validate_heap_if_required_nolock().
|
static |
Definition at line 122 of file debug_heap.cpp.
Referenced by free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
|
static |
Definition at line 132 of file debug_heap.cpp.
Referenced by _CrtIsMemoryBlock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
|
static |
Definition at line 114 of file debug_heap.cpp.
Referenced by _CrtCheckMemory(), _CrtDoForAllClientObjects(), _CrtMemCheckpoint(), dump_all_object_since_nolock(), free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
|
static |
Definition at line 115 of file debug_heap.cpp.
Referenced by free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
|
static |
Definition at line 123 of file debug_heap.cpp.
Referenced by _CrtMemCheckpoint(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
|
static |
Definition at line 121 of file debug_heap.cpp.
Referenced by _CrtMemCheckpoint(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
__finally |
Definition at line 765 of file debug_heap.cpp.
Referenced by _CrtCheckMemory(), _CrtDoForAllClientObjects(), _CrtIsMemoryBlock(), _CrtMemCheckpoint(), _CrtMemDumpAllObjectsSince(), _CrtSetDbgBlockType(), _CrtSetDbgFlag(), heap_alloc_dbg_internal(), and validate_heap_if_required_nolock().
__try |
Definition at line 760 of file debug_heap.cpp.
Referenced by _CrtCheckMemory(), _CrtDoForAllClientObjects(), _CrtIsMemoryBlock(), _CrtMemCheckpoint(), _CrtMemDumpAllObjectsSince(), _CrtSetDbgBlockType(), _CrtSetDbgFlag(), heap_alloc_dbg_internal(), is_bad_read_pointer(), and validate_heap_if_required_nolock().
long _crtBreakAlloc {-1} |
Definition at line 146 of file debug_heap.cpp.
Referenced by __p__crtBreakAlloc(), _CrtSetBreakAlloc(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
int _crtDbgFlag {_CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_DEFAULT_DF} |
Definition at line 145 of file debug_heap.cpp.
Referenced by __p__crtDbgFlag(), _CrtCheckMemory(), _CrtDoForAllClientObjects(), _CrtDumpMemoryLeaks(), _CrtMemDifference(), _CrtSetDbgFlag(), dump_all_object_since_nolock(), free_dbg_nolock(), and heap_alloc_dbg_internal().
_CRT_DUMP_CLIENT _pfnDumpClient {nullptr} |
Definition at line 147 of file debug_heap.cpp.
Referenced by _CrtGetDumpClient(), _CrtSetDumpClient(), and dump_all_object_since_nolock().
Definition at line 66 of file debug_heap.cpp.
Referenced by _aligned_free_dbg(), _aligned_offset_malloc_dbg(), _aligned_offset_realloc_dbg(), and is_block_an_aligned_allocation().
Definition at line 60 of file debug_heap.cpp.
Referenced by _aligned_free_dbg(), _aligned_offset_malloc_dbg(), _aligned_offset_realloc_dbg(), and is_block_an_aligned_allocation().
allocation_size {element_size * count} |
Definition at line 518 of file debug_heap.cpp.
Referenced by cache_container_is_valid().
return block {heap_alloc_dbg(allocation_size, block_use, file_name, line_number)} |
Definition at line 523 of file debug_heap.cpp.
Referenced by _aligned_free_dbg(), _aligned_msize_dbg(), _aligned_offset_realloc_dbg(), _aligned_offset_recalloc_dbg(), _aligned_realloc_dbg(), _aligned_recalloc_dbg(), _CrtIsMemoryBlock(), _CrtIsValidHeapPointer(), _CrtReportBlockType(), _CrtSetDbgBlockType(), free_dbg_nolock(), header_from_block(), heap_alloc_dbg(), heap_alloc_dbg_internal(), is_block_an_aligned_allocation(), and realloc_dbg_nolock().
Definition at line 495 of file debug_heap.cpp.
Referenced by _CrtSetDbgBlockType(), check_block(), free_dbg_nolock(), heap_alloc_dbg(), heap_alloc_dbg_internal(), is_block_type_valid(), and realloc_dbg_nolock().
|
static |
Definition at line 33 of file debug_heap.cpp.
Referenced by _CrtMemDumpStatistics(), check_block(), and free_dbg_nolock().
Definition at line 62 of file debug_heap.cpp.
Referenced by heap_alloc_dbg_internal(), and realloc_dbg_nolock().
Definition at line 781 of file debug_heap.cpp.
Definition at line 61 of file debug_heap.cpp.
Referenced by check_block(), and free_dbg_nolock().
Definition at line 510 of file debug_heap.cpp.
Referenced by _aligned_offset_recalloc_dbg(), _fread_nolock(), _fread_nolock_s(), _fwrite_nolock(), _fwrite_nolock_internal(), d3dcompiler_parse_signature(), d3drm_array_reserve(), debugsymbols_GetSourcePathElement(), debugsymbols_GetSourcePathElementWide(), DECLARE_INTERFACE_(), empty_image(), fill_image(), fread(), fread_s(), gluBuild2DMipmapLevelsCore(), halve1Dimage_byte(), halve1Dimage_float(), halve1Dimage_int(), halve1Dimage_short(), halve1Dimage_ubyte(), halve1Dimage_uint(), halve1Dimage_ushort(), halveImage_byte(), halveImage_float(), halveImage_int(), halveImage_short(), halveImage_ubyte(), halveImage_uint(), halveImage_ushort(), scale_internal_byte(), scale_internal_float(), scale_internal_int(), scale_internal_short(), scale_internal_ubyte(), scale_internal_uint(), scale_internal_ushort(), scaleInternalPackedPixel(), and validate_resource_view().
Definition at line 496 of file debug_heap.cpp.
Referenced by _aligned_malloc_dbg(), _aligned_offset_malloc_dbg(), _aligned_offset_realloc_dbg(), _aligned_offset_recalloc_dbg(), _aligned_realloc_dbg(), _aligned_recalloc_dbg(), _CrtIsMemoryBlock(), heap_alloc_dbg(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
Definition at line 1069 of file debug_heap.cpp.
Referenced by heap_alloc_dbg_internal().
Definition at line 260 of file debug_heap.cpp.
Referenced by validate_heap_if_required_nolock().
Definition at line 497 of file debug_heap.cpp.
Referenced by __acrt_MessageWindowA(), __acrt_MessageWindowW(), _aligned_malloc_dbg(), _aligned_offset_malloc_dbg(), _aligned_offset_realloc_dbg(), _aligned_offset_recalloc_dbg(), _aligned_realloc_dbg(), _aligned_recalloc_dbg(), _assert(), _CrtDbgReport(), _CrtDbgReportW(), _CrtDefaultAllocHook(), _CrtIsMemoryBlock(), _invoke_watson_if_error(), _invoke_watson_if_oneof(), _strdup(), _wassert(), _wcsdup(), common_assert(), common_assert_to_message_box(), common_assert_to_message_box_build_string(), common_assert_to_stderr_direct(), common_dupenv_s_nolock(), common_message_window(), compute_shader_probe9(), File::enum_lines(), find_str(), heap_alloc_dbg(), heap_alloc_dbg_internal(), pp_internal_error(), hhp_reader::read(), realloc_dbg_nolock(), test_IActiveScriptError(), throw(), and xmlreader_GetLineNumber().
Definition at line 70 of file debug_heap.cpp.
Referenced by free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
size_t const new_allocation_size {element_size * count } |
Definition at line 791 of file debug_heap.cpp.
Referenced by _aligned_offset_recalloc_dbg(), and if().
return new_block = realloc_dbg_nolock(block, &new_size, block_use, file_name, line_number, true) |
Definition at line 763 of file debug_heap.cpp.
Referenced by _aligned_offset_recalloc_dbg(), for(), if(), and realloc_dbg_nolock().
Definition at line 59 of file debug_heap.cpp.
Referenced by _aligned_free_dbg(), _aligned_offset_realloc_dbg(), check_block(), free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
Definition at line 65 of file debug_heap.cpp.
Referenced by _aligned_free_dbg(), _aligned_offset_realloc_dbg(), check_block(), free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
Definition at line 790 of file debug_heap.cpp.
Referenced by _aligned_offset_recalloc_dbg(), and if().
Definition at line 69 of file debug_heap.cpp.
Referenced by free_dbg_nolock(), heap_alloc_dbg_internal(), and realloc_dbg_nolock().
Definition at line 751 of file debug_heap.cpp.
Referenced by __crt_win32_buffer< Character, ResizePolicy >::allocate().
Definition at line 1057 of file debug_heap.cpp.
Referenced by heap_alloc_dbg_internal().