mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 19:19:41 +08:00
Fixed misuse of entry->size in SDL_TrackAllocation
entry->size is the size of the allocation, not the number of stack frames
This commit is contained in:
@@ -161,8 +161,8 @@ static void SDL_TrackAllocation(void *mem, size_t size)
|
|||||||
|
|
||||||
count = CaptureStackBackTrace(1, SDL_arraysize(frames), frames, NULL);
|
count = CaptureStackBackTrace(1, SDL_arraysize(frames), frames, NULL);
|
||||||
|
|
||||||
entry->size = SDL_min(count, MAXIMUM_TRACKED_STACK_DEPTH);
|
count = SDL_min(count, MAXIMUM_TRACKED_STACK_DEPTH);
|
||||||
for (i = 0; i < entry->size; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
char symbol_buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)];
|
char symbol_buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)];
|
||||||
PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)symbol_buffer;
|
PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)symbol_buffer;
|
||||||
DWORD64 dwDisplacement = 0;
|
DWORD64 dwDisplacement = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user