This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Amir Aslan Haghrah
Recipients Amir Aslan Haghrah, ammar2
Date 2018-12-22.17:43:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545500631.11.0.0770528567349.issue35562@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2018-12-22 17:43:53Amir Aslan Haghrahsetrecipients: + Amir Aslan Haghrah, ammar2
2018-12-22 17:43:51Amir Aslan Haghrahsetmessageid: <1545500631.11.0.0770528567349.issue35562@roundup.psfhosted.org>
2018-12-22 17:43:51Amir Aslan Haghrahlinkissue35562 messages
2018-12-22 17:43:51Amir Aslan Haghrahcreate