Message305327
| Author |
njs |
| Recipients |
benjamin.peterson, neologix, njs, pitrou, rhettinger, skrah, tim.peters, trent, vstinner, wscullin, xdegaye |
| Date |
2017年10月31日.18:26:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1509474377.77.0.213398074469.issue18835@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> But since no fast (kernel-zeroed) aligned_calloc() exists, I must use memset() anyway.
For large allocations, you'll probably be better off implementing your own aligned allocator on top of calloc than implementing your own calloc on top of an aligned allocator. (It's O(1) overhead versus O(n).) And once you're doing that you might want to use the same code for regular allocations too, so that you don't need to keep track of whether each memory block used aligned_calloc or aligned_malloc and can treat them the same... Depends on your exact circumstances. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年10月31日 18:26:17 | njs | set | recipients:
+ njs, tim.peters, rhettinger, pitrou, vstinner, benjamin.peterson, trent, skrah, neologix, xdegaye, wscullin |
| 2017年10月31日 18:26:17 | njs | set | messageid: <1509474377.77.0.213398074469.issue18835@psf.upfronthosting.co.za> |
| 2017年10月31日 18:26:17 | njs | link | issue18835 messages |
| 2017年10月31日 18:26:17 | njs | create |
|