Nathaniel Smith <n...@pobox.com> added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue18835>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to