forked from google/flatbuffers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalignment_test.fbs
More file actions
44 lines (37 loc) · 768 Bytes
/
Copy pathalignment_test.fbs
File metadata and controls
44 lines (37 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// sizeof(BadAlignmentSmall) == 12
// alignof(BadAlignmentSmall) == 4
struct BadAlignmentSmall {
var_0: uint;
var_1: uint;
var_2: uint;
}
// sizeof(BadAlignmentLarge) == 8
// alignof(BadAlignmentLarge) == 8
struct BadAlignmentLarge {
var_0: ulong;
}
table OuterLarge {
large: BadAlignmentLarge;
}
table BadAlignmentRoot {
large: OuterLarge;
small: [BadAlignmentSmall];
}
// sizeof(EvenSmallStruct) == 2
// alignof(EvenSmallStruct) == 1
struct EvenSmallStruct {
var_0: uint8;
var_1: uint8;
}
// sizeof(OddSmallStruct) == 3
// alignof(OddSmallStruct) == 1
struct OddSmallStruct {
var_0: uint8;
var_1: uint8;
var_2: uint8;
}
table SmallStructs {
even_structs: [EvenSmallStruct];
odd_structs: [OddSmallStruct];
}
root_type SmallStructs;