Message203589
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, belopolsky, neologix, python-dev, rhettinger, tim.peters, vstinner |
| Date |
2013年11月21日.08:56:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1385024181.74.0.381901861181.issue18874@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> If you really want to use packing, keep it.
>
> But please remove this:
> """
> + /* ensure that the frame_t structure is packed */
> + assert(sizeof(frame_t) == (sizeof(PyObject*) + sizeof(int)));
> """
I added this assertion to ensure that I used correct GCC __attribute__((packed)) and Visual Studio #pragma pack(4). It can now be removed, I checked at least one per compiler that the structure is packed :-)
I will add a comment explaining that packing the structure is an optimization to reduce the memory footprint, it can be disabled if tracemalloc does crash because of it. |
|