Message263541
Patch attached. The basics were okay; however, there was no locking around access to a static variable (_Py_AllocatedBlocks) so I added some. The way the code managed _Py_AllocatedBlocks was a bit odd; this approach resulted in fewer lines, but it was hard to follow, and adding locking support would have muddied it even further, so I simplified it. I also simplified the locking support a great deal ("SIMPLELOCK": YAGNI) and touched up the relevant comment.
Finally, I noticed a minor bug wrt added _Py_AllocatedBlocks: if you call PyMem_Realloc(NULL, 50000), that's really a new allocation, so _Py_AllocatedBlocks needs to be incremented, but it wasn't. Since Antoine is the father of _Py_AllocatedBlocks I added him to the nosy list. |
|
Date |
User |
Action |
Args |
2016-04-16 08:43:10 | larry | set | recipients:
+ larry, tim.peters, pitrou, vstinner |
2016-04-16 08:43:10 | larry | set | messageid: <1460796190.74.0.153470488524.issue26753@psf.upfronthosting.co.za> |
2016-04-16 08:43:10 | larry | link | issue26753 messages |
2016-04-16 08:43:10 | larry | create | |
|