Lines Matching refs:header
45 void FreeTrackData::LogFreeError(DebugData& debug, const Header* header, in LogFreeError() argument
52 for (size_t i = 0; i < header->usable_size; i++) { in LogFreeError()
57 auto back_iter = backtraces_.find(header); in LogFreeError()
66 void FreeTrackData::VerifyAndFree(DebugData& debug, const Header* header, in VerifyAndFree() argument
70 if (header->tag != DEBUG_FREE_TAG) { in VerifyAndFree()
72 error_log("+++ ALLOCATION %p HAS CORRUPTED HEADER TAG 0x%x AFTER FREE", pointer, header->tag); in VerifyAndFree()
76 size_t bytes = header->usable_size; in VerifyAndFree()
81 LogFreeError(debug, header, reinterpret_cast<const uint8_t*>(pointer)); in VerifyAndFree()
89 auto back_iter = backtraces_.find(header); in VerifyAndFree()
92 backtraces_.erase(header); in VerifyAndFree()
94 g_dispatch->free(header->orig_pointer); in VerifyAndFree()
97 void FreeTrackData::Add(DebugData& debug, const Header* header) { in Add() argument
113 backtraces_[header] = back_header; in Add()
116 list_.push_front(header); in Add()
125 for (const auto& header : list_) { in VerifyAll() local
126 VerifyAndFree(debug, header, debug.GetPointer(header)); in VerifyAll()
131 void FreeTrackData::LogBacktrace(const Header* header) { in LogBacktrace() argument
134 auto back_iter = backtraces_.find(header); in LogBacktrace()