3 ms·
> It doesn't matter that these bytes are filled with garbage, That's only true if the strategy avoids hitting an invalid page. Reading a single uint64_t which
by kazinator 6y ago
> It doesn't matter that these bytes are filled with garbage,
That's only true if the strategy avoids hitting an invalid page.
Reading a single uint64_t which is aligned on an 8 byte boundary will be fine. If any byte of that is within a valid page, the other bytes have to be.
If two uint64_t's are read, then as a whole, they have to be a 16-byte-aligned block for that same assurance to hold.
If the code is using misaligned reads, that itself will crash on some processor architectures, or possibly trigger expensive handling.
- vesinisa 6y agoDid you actually read the comment you replied to to the end?