]> git.saurik.com Git - apple/hfs.git/blobdiff - core/hfs_alloc_trace.h
hfs-522.100.5.tar.gz
[apple/hfs.git] / core / hfs_alloc_trace.h
diff --git a/core/hfs_alloc_trace.h b/core/hfs_alloc_trace.h
new file mode 100644 (file)
index 0000000..304a194
--- /dev/null
@@ -0,0 +1,34 @@
+//
+//  hfs_alloc_trace.h
+//  hfs
+//
+//  Created by Chris Suter on 8/19/15.
+//
+//
+
+#ifndef hfs_alloc_trace_h
+#define hfs_alloc_trace_h
+
+#include <sys/types.h>
+#include <stdbool.h>
+
+enum {
+       HFS_ALLOC_BACKTRACE_LEN = 4,
+};
+
+#pragma pack(push, 8)
+
+struct hfs_alloc_trace_info {
+       int entry_count;
+       bool more;
+       struct hfs_alloc_info_entry {
+               uint64_t ptr;
+               uint64_t sequence;
+               uint64_t size;
+               uint64_t backtrace[HFS_ALLOC_BACKTRACE_LEN];
+       } entries[];
+};
+
+#pragma pack(pop)
+
+#endif /* hfs_alloc_trace_h */