libsysprof-capture: add more assertions around alignment

This commit is contained in:
Christian Hergert
2020-03-05 15:24:47 -08:00
parent 6d8841267a
commit b33c3e8af9

View File

@ -346,7 +346,9 @@ G_STATIC_ASSERT (sizeof (SysprofCaptureMetadata) == 64);
G_STATIC_ASSERT (sizeof (SysprofCaptureLog) == 64);
G_STATIC_ASSERT (sizeof (SysprofCaptureFileChunk) == 284);
G_STATIC_ASSERT (sizeof (SysprofCaptureAllocation) == 48);
G_STATIC_ASSERT ((G_STRUCT_OFFSET (SysprofCaptureAllocation, addrs) % 8) == 0);
G_STATIC_ASSERT ((G_STRUCT_OFFSET (SysprofCaptureAllocation, addrs) % SYSPROF_CAPTURE_ALIGN) == 0);
G_STATIC_ASSERT ((G_STRUCT_OFFSET (SysprofCaptureSample, addrs) % SYSPROF_CAPTURE_ALIGN) == 0);
static inline gint
sysprof_capture_address_compare (SysprofCaptureAddress a,