Any one of you have faced a challenge with the memory alignment while reading byte words ?
Team I would like to know if any one of you have faced a challenge with the memory alignment while reading byte words ?
Solution:Jump to solution
what type of issue do you mean?
Unalignment? Having the data in memory address equal to some multiple of the word size will help it to be aligned. Take a look at https://www.geeksforgeeks.org/structure-member-alignment-padding-and-data-packing/'...
3 Replies
yes, often when dealing with endianness especially when swapping bytes and ensuring the correct value has been read.
Solution
what type of issue do you mean?
Unalignment? Having the data in memory address equal to some multiple of the word size will help it to be aligned. Take a look at https://www.geeksforgeeks.org/structure-member-alignment-padding-and-data-packing/'
I'll send you a screenshot