Created
September 8, 2015 12:42
-
-
Save coralmw/ab50a166ee9d4496fab9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct actionTable { | |
uint64_t nanos; // ulong max 4.9secs, ull max = 584 years | |
XTime clocks; | |
uint32_t pins; | |
uint32_t a1; | |
uint32_t a2; | |
} actionTable_t; | |
(XTime = u64) | |
niave assumption: that this is of size 8 + 8 + 4 + 4 + 4 = 28 | |
sizeof(actionTable_t) = 32 | |
allignment I guess? | |
reqs: struct is alligend to muiltiple of its largest member - 8 bytes. pad[4] on the end? | |
## pahole confirmed: | |
struct actionTable { | |
uint64_t nanos; /* 0 8 */ | |
XTime clocks; /* 8 8 */ | |
uint32_t pins; /* 16 4 */ | |
uint32_t a1; /* 20 4 */ | |
uint32_t a2; /* 24 4 */ | |
/* size: 32, cachelines: 1, members: 5 */ | |
/* padding: 4 */ | |
/* last cacheline: 32 bytes */ | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment