Merge "Remove the unused TrackHeader structure."
This commit is contained in:
commit
fe60bae4b7
2 changed files with 1 additions and 10 deletions
|
@ -58,11 +58,6 @@ struct Header {
|
||||||
static size_t max_size() { return (1U << 31) - 1; }
|
static size_t max_size() { return (1U << 31) - 1; }
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
struct TrackHeader {
|
|
||||||
Header* prev = nullptr;
|
|
||||||
Header* next = nullptr;
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
struct BacktraceHeader {
|
struct BacktraceHeader {
|
||||||
size_t num_frames;
|
size_t num_frames;
|
||||||
uintptr_t frames[0];
|
uintptr_t frames[0];
|
||||||
|
|
|
@ -67,14 +67,10 @@ __END_DECLS
|
||||||
constexpr char DIVIDER[] =
|
constexpr char DIVIDER[] =
|
||||||
"6 malloc_debug *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n";
|
"6 malloc_debug *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\n";
|
||||||
|
|
||||||
constexpr uint32_t TRACK_HEADER = 0x2;
|
constexpr uint32_t BACKTRACE_HEADER = 0x1;
|
||||||
constexpr uint32_t BACKTRACE_HEADER = 0x4;
|
|
||||||
|
|
||||||
static size_t get_tag_offset(uint32_t flags = 0, size_t backtrace_frames = 0) {
|
static size_t get_tag_offset(uint32_t flags = 0, size_t backtrace_frames = 0) {
|
||||||
size_t offset = BIONIC_ALIGN(sizeof(Header), sizeof(uintptr_t));
|
size_t offset = BIONIC_ALIGN(sizeof(Header), sizeof(uintptr_t));
|
||||||
if (flags & TRACK_HEADER) {
|
|
||||||
offset += BIONIC_ALIGN(sizeof(TrackHeader), sizeof(uintptr_t));
|
|
||||||
}
|
|
||||||
if (flags & BACKTRACE_HEADER) {
|
if (flags & BACKTRACE_HEADER) {
|
||||||
offset += BIONIC_ALIGN(sizeof(BacktraceHeader) + sizeof(uintptr_t) * backtrace_frames, sizeof(uintptr_t));
|
offset += BIONIC_ALIGN(sizeof(BacktraceHeader) + sizeof(uintptr_t) * backtrace_frames, sizeof(uintptr_t));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue