Message332358
Thank you for your response.
I noticed this issue while working with 'mmap' and memory sharing.
As you said I check it in 'C++' and I got the same result for my struct as Python.
---------------------------------------------------------------------
I used the 'sizeof' function to calculate my struct size to read it from mapped memory and I get wrong output in reading memory because of this aligning procedure.
Question: Structs map to memory unaligned but sizeof return the aligned size of struct.
How we can calculate the sizeof struct to use it in reading from memory? |
|
Date |
User |
Action |
Args |
2018-12-22 17:43:53 | Amir Aslan Haghrah | set | recipients:
+ Amir Aslan Haghrah, ammar2 |
2018-12-22 17:43:51 | Amir Aslan Haghrah | set | messageid: <1545500631.11.0.0770528567349.issue35562@roundup.psfhosted.org> |
2018-12-22 17:43:51 | Amir Aslan Haghrah | link | issue35562 messages |
2018-12-22 17:43:51 | Amir Aslan Haghrah | create | |
|