diff options
Diffstat (limited to 'src/OpenSSL/_util.py')
| -rw-r--r-- | src/OpenSSL/_util.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/OpenSSL/_util.py b/src/OpenSSL/_util.py index 48bcbf5..cf8b888 100644 --- a/src/OpenSSL/_util.py +++ b/src/OpenSSL/_util.py @@ -12,6 +12,12 @@ ffi = binding.ffi lib = binding.lib +# This is a special CFFI allocator that does not bother to zero its memory +# after allocation. This has vastly better performance on large allocations and +# so should be used whenever we don't need the memory zeroed out. +no_zero_allocator = ffi.new_allocator(should_clear_after_alloc=False) + + def text(charp): """ Get a native string type representing of the given CFFI ``char*`` object. |
